提交 59d6a759 编写于 作者: R Robert Haas

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.
上级 c0b00760
......@@ -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>
......
......@@ -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. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册