Adding variables for segment_size, wal_segment_size and block sizes

Поиск
Список
Период
Сортировка
Искать

Adding variables for segment_size, wal_segment_size and block sizes

От:
Bernd Helmle <mailings@oopsware.de>
Дата:
Now that we have customizable segment sizes for heap and WAL at compilation 
time i would like to have some runtime variables to query that information 
(besides pg_controldata). I can imagine to have the following names:

segment_size: Reports heap segment size
wal_segment_size: Reports wal segment size
block_size: Available yet
wal_block_size: wal block size

I'd like to implement them if we agree on them

--  Thanks
                   Bernd

Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Euler Taveira de Oliveira <euler@timbira.com>
Дата:
Bernd Helmle wrote:

> segment_size: Reports heap segment size
> wal_segment_size: Reports wal segment size
> block_size: Available yet
> wal_block_size: wal block size
> 
+1. We already have block_size in GUC.


--   Euler Taveira de Oliveira  http://www.timbira.com/

Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Bruce Momjian <bruce@momjian.us>
Дата:
Bernd Helmle wrote:
> Now that we have customizable segment sizes for heap and WAL at compilation 
> time i would like to have some runtime variables to query that information 
> (besides pg_controldata). I can imagine to have the following names:
> 
> segment_size: Reports heap segment size
> wal_segment_size: Reports wal segment size
> block_size: Available yet
> wal_block_size: wal block size
> 
> I'd like to implement them if we agree on them

Bernd, have you made any progress on this?

--  Bruce Momjian          http://momjian.us EnterpriseDB                             http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +

Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Bernd Helmle <mailings@oopsware.de>
Дата:
Вложения:
--On Montag, Juni 30, 2008 18:47:33 -0400 Bruce Momjian  
wrote:

>>
>> I'd like to implement them if we agree on them
>
> Bernd, have you made any progress on this?

Here's a patch for this. I'll add it to the commit fest wiki page if it's 
okay for you.

-- 
  Thanks

                    Bernd

Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Simon Riggs <simon@2ndquadrant.com>
Дата:

On Thu, 2008-07-03 at 16:36 +0200, Bernd Helmle wrote:
> --On Montag, Juni 30, 2008 18:47:33 -0400 Bruce Momjian  
> wrote:
> 
> >>
> >> I'd like to implement them if we agree on them
> >
> > Bernd, have you made any progress on this?
> 
> Here's a patch for this. I'll add it to the commit fest wiki page if it's 
> okay for you.

It's small and uncontentious, please add it to the wiki.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support


Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Abhijit Menon-Sen <ams@oryx.com>
Дата:
At 2008-07-03 16:36:02 +0200, mailings@oopsware.de wrote:
>
> Here's a patch for this.

I reviewed the patch, it basically looks fine. A few quibbles with the
provided documentation:

> +         Reports the number of pages which can be stored within a file segment.  
> +         The total physical size of a segment file in bytes can be determined by multiplying
> +         the block_size parameter with segment_size.

I would say:
   Reports the number of blocks/pages which can be stored within a file   segment. The total size of a segment file in bytes is equal to the   segment_size</> multiplied by the block_size</>.

> +         Reports the size of a write ahead log disk block.  It is determined by the value
> +         of XLOG_BLCKSZ</> when building the server. The default
> +         value is 8192 bytes. wal_block_size influences the total physical
> +         size of a write ahead log segment. See  +         linkend="guc-wal-segment-size"> for more information.
> +        

I'd change "write ahead log disk block" to "WAL disk block". How about
this:
   Reports the size of a WAL disk block, as determined by the value of   XLOG_BLCKSZ</> when compiling the server. The default is   8192 bytes. wal_block_size</> influences the total size of   a WAL segment file. See  for   more information.

> +         Reports the number of pages within a write ahead log segment file. wal_segment_size multiplied with wal_block_size gives the total physical size of a write ahead
> +         log segment file in bytes.

Again, I'd say "WAL" here instead of "write ahead log", because the full
form is clumsy in context. How about this:
   Reports the number of pages in a WAL segment file. The total size of   a WAL segment file in bytes is equal to wal_segment_size</>   multiplied by wal_block_size</>.

What do you think?

-- ams

Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Simon Riggs <simon@2ndquadrant.com>
Дата:

On Thu, 2008-07-03 at 16:36 +0200, Bernd Helmle wrote:
> --On Montag, Juni 30, 2008 18:47:33 -0400 Bruce Momjian  
> wrote:
> 
> >>
> >> I'd like to implement them if we agree on them
> >
> > Bernd, have you made any progress on this?
> 
> Here's a patch for this. I'll add it to the commit fest wiki page if it's 
> okay for you.

I'm not sure why you've included "access/xlog_internal.h".

All the #defines come from pgconfig.h

Maybe that changed from when you started thinking about this?

Other than that, no other comments. Looks good.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support


Re: Adding variables for segment_size, wal_segment_size and block sizes

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Abhijit Menon-Sen  writes:
> At 2008-07-03 16:36:02 +0200, mailings@oopsware.de wrote:
>> Here's a patch for this.

> I reviewed the patch, it basically looks fine. A few quibbles with the
> provided documentation:

Applied, with ams' doc changes and some further wordsmithing.
		regards, tom lane

FAQ