diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-03-01 11:32:23 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-03-01 11:34:25 -0500 |
commit | 59d6a7594288ebc909a24f3fc9e502f097bbe2ff (patch) | |
tree | b4d3fbb6a2bd33b73015906f2038862c053eb6de | |
parent | c0b00760365c74308e9e0719c993eadfbcd090c2 (diff) | |
download | postgresql-59d6a7594288ebc909a24f3fc9e502f097bbe2ff.tar.gz postgresql-59d6a7594288ebc909a24f3fc9e502f097bbe2ff.zip |
Avoid excessive Hot Standby feedback messages.
Without this patch, when wal_receiver_status_interval=0, indicating that no
status messages should be sent, Hot Standby feedback messages are instead sent
extremely frequently.
Fujii Masao, with documentation changes by me.
-rw-r--r-- | doc/src/sgml/config.sgml | 7 | ||||
-rw-r--r-- | src/backend/replication/walreceiver.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 46ffbff1087..86844147517 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -2137,9 +2137,10 @@ SET ENABLE_SEQSCAN TO OFF; <para> Specifies whether or not a hot standby will send feedback to the primary about queries currently executing on the standby. This parameter can - be used to eliminate query cancels caused by cleanup records, though - it can cause database bloat on the primary for some workloads. - The default value is <literal>off</literal>. + be used to eliminate query cancels caused by cleanup records, but + can cause database bloat on the primary for some workloads. + The default value is <literal>off</literal>. Feedback messages will not + be sent more frequently than once per <varname>wal_receiver_status_interval</>. </para> </listitem> </varlistentry> diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index c7f5bd5ea39..3826e82c052 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -651,7 +651,7 @@ XLogWalRcvSendHSFeedback(void) * If the user doesn't want status to be reported to the master, be sure * to exit before doing anything at all. */ - if (!hot_standby_feedback) + if (wal_receiver_status_interval <= 0 || !hot_standby_feedback) return; /* Get current timestamp. */ |