On Wed, Sep 19, 2018 at 06:21:52AM +0000, Tsunakawa, Takayuki wrote: > How embarrassing... I'm sorry to cause you trouble to point out a > silly mistake like this (I thought I would write as you suggested, but > it seems that I was not who I usually am.) The revised patch > attached.
Thanks for the new version. Per my comments up-thread here, you cannot actually use PGC_BACKEND: https://www.postgresql.org/message-id/20180919061303.gb19...@paquier.xyz This would break the case where this parameter is reloaded when a session does not use a custom value for wal_sender_timeout. I have also looked at all the code paths using wal_sender_timeout, and the change looks safe to me. Please find attached an update, simplified, version. Does that look fine to you? -- Michael
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index e1073ac6d3..29bd0eca8c 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3127,10 +3127,8 @@ include_dir 'conf.d' Terminate replication connections that are inactive longer than the specified number of milliseconds. This is useful for the sending server to detect a standby crash or network outage. - A value of zero disables the timeout mechanism. This parameter - can only be set in - the <filename>postgresql.conf</filename> file or on the server command line. - The default value is 60 seconds. + A value of zero disables the timeout mechanism. The default value + is 60 seconds. </para> </listitem> </varlistentry> diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 77662aff7f..e9f542cfed 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2539,7 +2539,7 @@ static struct config_int ConfigureNamesInt[] = }, { - {"wal_sender_timeout", PGC_SIGHUP, REPLICATION_SENDING, + {"wal_sender_timeout", PGC_USERSET, REPLICATION_SENDING, gettext_noop("Sets the maximum time to wait for WAL replication."), NULL, GUC_UNIT_MS
signature.asc
Description: PGP signature