The wal_debug GUC variable was of type integer, but it was used in
the code effectively as a boolean: the code only tested whether it was
zero or non-zero. This patch makes it a proper boolean.
-Neil
Index: doc/src/sgml/runtime.sgml
===
RCS file: /var/lib/cvs/pgsql-server/doc/src/sgml/runtime.sgml,v
retrieving revision 1.226
diff -c -r1.226 runtime.sgml
*** doc/src/sgml/runtime.sgml 6 Dec 2003 23:10:23 - 1.226
--- doc/src/sgml/runtime.sgml 11 Dec 2003 18:46:14 -
***
*** 2667,2676
/varlistentry
varlistentry
! termvarnamewal_debug/varname (typeinteger/type)/term
listitem
para
! If nonzero, turn on WAL-related debugging output.
/para
/listitem
/varlistentry
--- 2667,2676
/varlistentry
varlistentry
! termvarnamewal_debug/varname (typeboolean/type)/term
listitem
para
! If true, emit WAL-related debugging output.
/para
/listitem
/varlistentry
Index: doc/src/sgml/wal.sgml
===
RCS file: /var/lib/cvs/pgsql-server/doc/src/sgml/wal.sgml,v
retrieving revision 1.26
diff -c -r1.26 wal.sgml
*** doc/src/sgml/wal.sgml 29 Nov 2003 19:51:38 - 1.26
--- doc/src/sgml/wal.sgml 11 Dec 2003 18:50:06 -
***
*** 19,28
transaction processing. Briefly, acronymWAL/acronym's central
concept is that changes to data files (where tables and indexes
reside) must be written only after those changes have been logged,
!that is, when log records have been flushed to permanent
!storage. If we follow this procedure, we do not need to flush
!data pages to disk on every transaction commit, because we know
!that in the event of a crash we will be able to recover the
database using the log: any changes that have not been applied to
the data pages will first be redone from the log records (this is
roll-forward recovery, also known as REDO) and then changes made by
--- 19,28
transaction processing. Briefly, acronymWAL/acronym's central
concept is that changes to data files (where tables and indexes
reside) must be written only after those changes have been logged,
!that is, when log records describing the changes have been flushed
!to permanent storage. If we follow this procedure, we do not need
!to flush data pages to disk on every transaction commit, because we
!know that in the event of a crash we will be able to recover the
database using the log: any changes that have not been applied to
the data pages will first be redone from the log records (this is
roll-forward recovery, also known as REDO) and then changes made by
***
*** 187,193
para
There will be at least one 16 MB segment file, and will normally
not be more than 2 * varnamecheckpoint_segments/varname + 1
!files. You can use this to estimate space requirements for WAL.
Ordinarily, when old log segment files are no longer needed, they
are recycled (renamed to become the next segments in the numbered
sequence). If, due to a short-term peak of log output rate, there
--- 187,193
para
There will be at least one 16 MB segment file, and will normally
not be more than 2 * varnamecheckpoint_segments/varname + 1
!files. You can use this to estimate space requirements for acronymWAL/acronym.
Ordinarily, when old log segment files are no longer needed, they
are recycled (renamed to become the next segments in the numbered
sequence). If, due to a short-term peak of log output rate, there
***
*** 254,260
para
The varnamewal_sync_method/varname parameter determines how
productnamePostgreSQL/productname will ask the kernel to force
! WAL updates out to disk.
All the options should be the same as far as reliability goes,
but it's quite platform-specific which one will be the fastest.
Note that this parameter is irrelevant if varnamefsync/varname
--- 254,260
para
The varnamewal_sync_method/varname parameter determines how
productnamePostgreSQL/productname will ask the kernel to force
! acronymWAL/acronym updates out to disk.
All the options should be the same as far as reliability goes,
but it's quite platform-specific which one will be the fastest.
Note that this parameter is irrelevant if varnamefsync/varname
***
*** 262,272
/para
para
!Setting the varnamewal_debug/varname parameter to any nonzero
!value will result in each functionLogInsert/function and
functionLogFlush/function acronymWAL/acronym call being
!logged to the server log. At present, it makes no difference what
!the nonzero value is. This option may be replaced by a more
general mechanism in