Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb361db

Browse files
committed
Make GUC wal_sender_timeout user-settable
Being able to use a value that can be changed on a connection basis isuseful with clusters distributed geographically, and makes failuredetection more flexible. A note is added in the documentation about theuse of "options" in primary_conninfo, which can be hard to grasp fornewcomers with the need of two single quotes when listing a set ofparameters.Author: Tsunakawa TakayukiReviewed-by: Masahiko Sawada, Michael PaquierDiscussion:https://postgr.es/m/0A3221C70F24FB45833433255569204D1FAAD3AE@G01JPEXMBYT05
1 parent4f3b38f commitdb361db

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3127,10 +3127,14 @@ include_dir 'conf.d'
31273127
Terminate replication connections that are inactive longer
31283128
than the specified number of milliseconds. This is useful for
31293129
the sending server to detect a standby crash or network outage.
3130-
A value of zero disables the timeout mechanism. This parameter
3131-
can only be set in
3132-
the <filename>postgresql.conf</filename> file or on the server command line.
3133-
The default value is 60 seconds.
3130+
A value of zero disables the timeout mechanism. The default value
3131+
is 60 seconds. With a cluster distributed across multiple geographic
3132+
locations, using different values per location brings more flexibility
3133+
in the cluster management. A smaller value is useful for faster
3134+
failure detection with a standby having a low-latency network
3135+
connection, and a larger value helps in judging better the health
3136+
of a standby if located on a remote location, with a high-latency
3137+
network connection.
31343138
</para>
31353139
</listitem>
31363140
</varlistentry>

‎doc/src/sgml/high-availability.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ protocol to make nodes agree on a serializable transactional order.
738738
A simple example of a <filename>recovery.conf</filename> is:
739739
<programlisting>
740740
standby_mode = 'on'
741-
primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
741+
primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass options=''-c wal_sender_timeout=5000'''
742742
restore_command = 'cp /path/to/archive/%f %p'
743743
archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r'
744744
</programlisting>

‎src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2539,7 +2539,7 @@ static struct config_int ConfigureNamesInt[] =
25392539
},
25402540

25412541
{
2542-
{"wal_sender_timeout",PGC_SIGHUP,REPLICATION_SENDING,
2542+
{"wal_sender_timeout",PGC_USERSET,REPLICATION_SENDING,
25432543
gettext_noop("Sets the maximum time to wait for WAL replication."),
25442544
NULL,
25452545
GUC_UNIT_MS

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp