wal buffers documentation -errata

Started by Dave Cramerover 19 years ago6 messageshackers
Jump to latest
#1Dave Cramer
pg@fastcrypt.com

Currently says

Number of disk-page buffers allocated in shared memory for WAL data.
The default is 8. The setting need only be large enough to hold the
amount of WAL data generated by one typical transaction, since the
data is written out to disk at every transaction commit. This
parameter can only be set at server start.

However I just loaded up an 8.2.1 and the default is 32m

Dave

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Cramer (#1)
Re: wal buffers documentation -errata

Dave Cramer <pg@fastcrypt.com> writes:

However I just loaded up an 8.2.1 and the default is 32m

Then you changed it in postgresql.conf. I get

$ psql
Welcome to psql 8.2.1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

regression=# show wal_buffers ;
wal_buffers
-------------
64kB
(1 row)

regression=#

regards, tom lane

#3Dave Cramer
pg@fastcrypt.com
In reply to: Tom Lane (#2)
Re: wal buffers documentation -errata

Tom,

the point is that the documentation suggests that the default is 8

not 8MB, but 8, when in fact the defaults are now given in memory
units not pages

Dave
On 11-Jan-07, at 10:09 AM, Tom Lane wrote:

Show quoted text

Dave Cramer <pg@fastcrypt.com> writes:

However I just loaded up an 8.2.1 and the default is 32m

Then you changed it in postgresql.conf. I get

$ psql
Welcome to psql 8.2.1, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

regression=# show wal_buffers ;
wal_buffers
-------------
64kB
(1 row)

regression=#

regards, tom lane

---------------------------(end of
broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Cramer (#3)
Re: wal buffers documentation -errata

Dave Cramer <pg@fastcrypt.com> writes:

the point is that the documentation suggests that the default is 8
not 8MB, but 8, when in fact the defaults are now given in memory
units not pages

Oh, I thought you were complaining that the value was numerically wrong.

Perhaps we should convert the documentation to show the defaults in a
units-ified way, but if so it needs to be done consistently. Most of
the entries seem not to have been changed; for example shared_buffers
is still described in blocks.

regards, tom lane

#5Dave Cramer
pg@fastcrypt.com
In reply to: Tom Lane (#4)
Re: wal buffers documentation -errata

On 11-Jan-07, at 12:49 PM, Tom Lane wrote:

Dave Cramer <pg@fastcrypt.com> writes:

the point is that the documentation suggests that the default is 8
not 8MB, but 8, when in fact the defaults are now given in memory
units not pages

Oh, I thought you were complaining that the value was numerically
wrong.

Perhaps we should convert the documentation to show the defaults in a
units-ified way, but if so it needs to be done consistently. Most of
the entries seem not to have been changed; for example shared_buffers
is still described in blocks.

Yes, everything is described in blocks, but in the configuration file
everything (I've looked at so far) is specified in memory units.
While I appreciate the effort that went into making it somewhat
easier to use memory units I can see this being very confusing for
the average user.

I would suggest that the documentation needs to be consistent with
the example configuration file installed by initdb

Dave

Show quoted text

regards, tom lane

---------------------------(end of
broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

#6Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#5)
Re: [HACKERS] wal buffers documentation -errata

I have applied the attached patches to CVS HEAD and 8.2.X to mention
defaults that match the contents of postgresql.conf. I also added a
mention that pg_settings.unit shows the default units for a setting.

One problem is that some settings use a default unit of seconds, but the
default value is one minute, or "1m". shared_buffers has a similar
problem, using 8k blocks as the default unit, but having a default value
of 32MB or similar.

I am unsure how we can really improve this. Saying the default units
are measured in seconds, but the default value is 1 minute is pretty
confusing. Hopefully the pg_settings.unit mention will help, and users
will always use units for fields that have them in postgresql.conf.

I have added lines documenting the memory and time units to
postgresql.conf. Hopefully that will help too.

---------------------------------------------------------------------------

Dave Cramer wrote:

On 11-Jan-07, at 12:49 PM, Tom Lane wrote:

Dave Cramer <pg@fastcrypt.com> writes:

the point is that the documentation suggests that the default is 8
not 8MB, but 8, when in fact the defaults are now given in memory
units not pages

Oh, I thought you were complaining that the value was numerically
wrong.

Perhaps we should convert the documentation to show the defaults in a
units-ified way, but if so it needs to be done consistently. Most of
the entries seem not to have been changed; for example shared_buffers
is still described in blocks.

Yes, everything is described in blocks, but in the configuration file
everything (I've looked at so far) is specified in memory units.
While I appreciate the effort that went into making it somewhat
easier to use memory units I can see this being very confusing for
the average user.

I would suggest that the documentation needs to be consistent with
the example configuration file installed by initdb

Dave

regards, tom lane

---------------------------(end of
broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachments:

/rtmp/difftext/x-diffDownload+253-253
/rtmp/diff2text/x-diffDownload+3-0