diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index 925a6ebb12..4f1876b20b 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -7878,7 +7878,7 @@ SCRAM-SHA-256$<iteration count>:&l
subminapplydelay int4
- The minimum amount of time to delay applying changes, in milliseconds.
+ The minimum delay (ms) for applying changes.
diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
index 629366f91a..8a713e99f6 100644
--- a/src/backend/commands/subscriptioncmds.c
+++ b/src/backend/commands/subscriptioncmds.c
@@ -420,12 +420,12 @@ parse_subscription_options(ParseState *pstate, List *stmt_options,
/*
* The combination of parallel streaming mode and min_apply_delay is not
- * allowed. This is because we start applying the transaction stream as
- * soon as the first change arrives without knowing the transaction's
- * prepare/commit time. This means we cannot calculate the underlying
- * network/decoding lag between publisher and subscriber, and so always
- * waiting for the full 'min_apply_delay' period might include unnecessary
- * delay.
+ * allowed. This is because in parallel streaming mode, we start applying
+ * the transaction stream as soon as the first change arrives without
+ * knowing the transaction's prepare/commit time. This means we cannot
+ * calculate the underlying network/decoding lag between publisher and
+ * subscriber, and so always waiting for the full 'min_apply_delay' period
+ * might include unnecessary delay.
*
* The other possibility was to apply the delay at the end of the parallel
* apply transaction but that would cause issues related to resource bloat
@@ -437,7 +437,7 @@ parse_subscription_options(ParseState *pstate, List *stmt_options,
errcode(ERRCODE_SYNTAX_ERROR),
/*
- * - translator: the first %s is a string of the form "parameter > 0"
+ * translator: the first %s is a string of the form "parameter > 0"
* and the second one is "option = value".
*/
errmsg("%s and %s are mutually exclusive options",
@@ -1141,13 +1141,13 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
/*
* The combination of parallel streaming mode and
* min_apply_delay is not allowed. See
- * parse_subscription_options for details of the reason.
+ * parse_subscription_options.
*/
if (opts.streaming == LOGICALREP_STREAM_PARALLEL &&
!IsSet(opts.specified_opts, SUBOPT_MIN_APPLY_DELAY) && sub->minapplydelay > 0)
ereport(ERROR,
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("cannot enable parallel streaming mode for subscription with %s",
+ errmsg("cannot set parallel streaming mode for subscription with %s",
"min_apply_delay"));
values[Anum_pg_subscription_substream - 1] =
@@ -1167,14 +1167,15 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
{
/*
* The combination of parallel streaming mode and
- * min_apply_delay is not allowed.
+ * min_apply_delay is not allowed. See
+ * parse_subscription_options.
*/
if (opts.min_apply_delay > 0 &&
!IsSet(opts.specified_opts, SUBOPT_STREAMING) && sub->stream == LOGICALREP_STREAM_PARALLEL)
ereport(ERROR,
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
- errmsg("cannot enable %s for subscription in %s mode",
- "min_apply_delay", "streaming = parallel"));
+ errmsg("cannot set %s for subscription in parallel streaming mode",
+ "min_apply_delay"));
values[Anum_pg_subscription_subminapplydelay - 1] =
Int32GetDatum(opts.min_apply_delay);
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 9b3de65de7..fde6978950 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -3911,9 +3911,9 @@ send_feedback(XLogRecPtr recvpos, bool force, bool requestReply, bool has_unproc
pq_sendint64(reply_message, now); /* sendTime */
pq_sendbyte(reply_message, requestReply); /* replyRequested */
- elog(DEBUG2, "sending feedback (force %d, has_unprocessed_change %s) to recv %X/%X, write %X/%X, flush %X/%X",
+ elog(DEBUG2, "sending feedback (force %d, has_unprocessed_change %d) to recv %X/%X, write %X/%X, flush %X/%X",
force,
- has_unprocessed_change ? "yes" : "no",
+ has_unprocessed_change,
LSN_FORMAT_ARGS(recvpos),
LSN_FORMAT_ARGS(writepos),
LSN_FORMAT_ARGS(flushpos));