mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Remove wal_sender_delay GUC, because it's no longer useful.
The latch infrastructure is now capable of detecting all cases where the walsender loop needs to wake up, so there is no reason to have an arbitrary timeout. Also, modify the walsender loop logic to follow the standard pattern of ResetLatch, test for work to do, WaitLatch. The previous coding was both hard to follow and buggy: it would sometimes busy-loop despite having nothing available to do, eg between receipt of a signal and the next time it was caught up with new WAL, and it also had interesting choices like deciding to update to WALSNDSTATE_STREAMING on the strength of information known to be obsolete.
This commit is contained in:
@ -2008,29 +2008,6 @@ SET ENABLE_SEQSCAN TO OFF;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry id="guc-wal-sender-delay" xreflabel="wal_sender_delay">
|
||||
<term><varname>wal_sender_delay</varname> (<type>integer</type>)</term>
|
||||
<indexterm>
|
||||
<primary><varname>wal_sender_delay</> configuration parameter</primary>
|
||||
</indexterm>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the delay between activity rounds for WAL sender processes.
|
||||
In each round the WAL sender sends any WAL accumulated since the last
|
||||
round to the standby server. It then sleeps for
|
||||
<varname>wal_sender_delay</> milliseconds, and repeats. The sleep
|
||||
is interrupted by transaction commit, so the effects of a committed
|
||||
transaction are sent to standby servers as soon as the commit
|
||||
happens, regardless of this setting. The default value is one second
|
||||
(<literal>1s</>).
|
||||
Note that on many systems, the effective resolution of sleep delays is
|
||||
10 milliseconds; setting <varname>wal_sender_delay</> to a value that
|
||||
is not a multiple of 10 might have the same results as setting it to
|
||||
the next higher multiple of 10. This parameter can only be set in the
|
||||
<filename>postgresql.conf</> file or on the server command line.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-wal-keep-segments" xreflabel="wal_keep_segments">
|
||||
<term><varname>wal_keep_segments</varname> (<type>integer</type>)</term>
|
||||
|
Reference in New Issue
Block a user