Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 59d6a75

Browse files
committed
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.
1 parent c0b0076 commit 59d6a75

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/src/sgml/config.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,9 +2137,10 @@ SET ENABLE_SEQSCAN TO OFF;
21372137
<para>
21382138
Specifies whether or not a hot standby will send feedback to the primary
21392139
about queries currently executing on the standby. This parameter can
2140-
be used to eliminate query cancels caused by cleanup records, though
2141-
it can cause database bloat on the primary for some workloads.
2142-
The default value is <literal>off</literal>.
2140+
be used to eliminate query cancels caused by cleanup records, but
2141+
can cause database bloat on the primary for some workloads.
2142+
The default value is <literal>off</literal>. Feedback messages will not
2143+
be sent more frequently than once per <varname>wal_receiver_status_interval</>.
21432144
</para>
21442145
</listitem>
21452146
</varlistentry>

src/backend/replication/walreceiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ XLogWalRcvSendHSFeedback(void)
651651
* If the user doesn't want status to be reported to the master, be sure
652652
* to exit before doing anything at all.
653653
*/
654-
if (!hot_standby_feedback)
654+
if (wal_receiver_status_interval <= 0 || !hot_standby_feedback)
655655
return;
656656

657657
/* Get current timestamp. */

0 commit comments

Comments
 (0)