Increase the default for wal_sender_delay from 200ms to 1s. Now that WAL
sender is immediately woken up by transaction commit, there's no need to wake up so aggressively.
This commit is contained in:
parent
42e5223648
commit
be6668d6ef
@ -1939,8 +1939,11 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
Specifies the delay between activity rounds for WAL sender processes.
|
Specifies the delay between activity rounds for WAL sender processes.
|
||||||
In each round the WAL sender sends any WAL accumulated since the last
|
In each round the WAL sender sends any WAL accumulated since the last
|
||||||
round to the standby server. It then sleeps for
|
round to the standby server. It then sleeps for
|
||||||
<varname>wal_sender_delay</> milliseconds, and repeats. The default
|
<varname>wal_sender_delay</> milliseconds, and repeats. The sleep
|
||||||
value is 200 milliseconds (<literal>200ms</>).
|
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
|
Note that on many systems, the effective resolution of sleep delays is
|
||||||
10 milliseconds; setting <varname>wal_sender_delay</> to a value that
|
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
|
is not a multiple of 10 might have the same results as setting it to
|
||||||
|
@ -73,7 +73,7 @@ bool am_walsender = false; /* Am I a walsender process ? */
|
|||||||
|
|
||||||
/* User-settable parameters for walsender */
|
/* User-settable parameters for walsender */
|
||||||
int max_wal_senders = 0; /* the maximum number of concurrent walsenders */
|
int max_wal_senders = 0; /* the maximum number of concurrent walsenders */
|
||||||
int WalSndDelay = 200; /* max sleep time between some actions */
|
int WalSndDelay = 1000; /* max sleep time between some actions */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These variables are used similarly to openLogFile/Id/Seg/Off,
|
* These variables are used similarly to openLogFile/Id/Seg/Off,
|
||||||
|
@ -1843,7 +1843,7 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
GUC_UNIT_MS
|
GUC_UNIT_MS
|
||||||
},
|
},
|
||||||
&WalSndDelay,
|
&WalSndDelay,
|
||||||
200, 1, 10000, NULL, NULL
|
1000, 1, 10000, NULL, NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
|
|
||||||
#max_wal_senders = 0 # max number of walsender processes
|
#max_wal_senders = 0 # max number of walsender processes
|
||||||
# (change requires restart)
|
# (change requires restart)
|
||||||
#wal_sender_delay = 200ms # walsender cycle time, 1-10000 milliseconds
|
#wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds
|
||||||
#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
|
#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
|
||||||
#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
|
#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user