mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur
only if at least N other backends currently have open transactions. This is not a great deal of intelligence about whether a delay might be profitable ... but it beats no intelligence at all. Note that the default COMMIT_DELAY is still zero --- this new code does nothing unless that setting is changed. Also, mark ENABLEFSYNC as a system-wide setting. It's no longer safe to allow that to be set per-backend, since we may be relying on some other backend's fsync to have synced the WAL log.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.2 2001/02/18 04:50:43 tgl Exp $ -->
|
||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/wal.sgml,v 1.3 2001/02/26 00:50:07 tgl Exp $ -->
|
||||
|
||||
<chapter id="wal">
|
||||
<title>Write-Ahead Logging (<acronym>WAL</acronym>)</title>
|
||||
@ -295,10 +295,13 @@
|
||||
record to the log with <function>LogInsert</function> but before
|
||||
performing a <function>LogFlush</function>. This delay allows other
|
||||
backends to add their commit records to the log so as to have all
|
||||
of them flushed with a single log sync. Unfortunately, this
|
||||
mechanism is not fully implemented at release 7.1, so there is at
|
||||
present usually no benefit to be gained from increasing this parameter
|
||||
above its default value of zero.
|
||||
of them flushed with a single log sync. No sleep will occur if fsync
|
||||
is not enabled or if fewer than <varname>COMMIT_SIBLINGS</varname>
|
||||
other backends are not currently in active transactions; this avoids
|
||||
sleeping when it's unlikely that any other backend will commit soon.
|
||||
Note that on most platforms, the resolution of a sleep request is
|
||||
ten milliseconds, so that any nonzero <varname>COMMIT_DELAY</varname>
|
||||
setting between 1 and 10000 microseconds will have the same effect.
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
Reference in New Issue
Block a user