From 010e4f82ae727283ee7783399d131113dd02a1d2 Mon Sep 17 00:00:00 2001 From: Vignesh C Date: Thu, 30 Jul 2026 15:45:04 +0530 Subject: [PATCH] Improve wording of sequence origin warning in logical replication check_publications_origin_sequences() warns when a subscription with origin = NONE synchronizes sequence values that may have originated from another subscription. The existing warning is phrased in terms of copy_data and copying data, which is appropriate for table synchronization but misleading for sequence synchronization. Reword the warning, detail, and hint to describe sequence synchronization and the associated origin = NONE semantics more accurately. Also fix a typo ("rathen" -> "rather") in a comment in sequencesync.c. --- src/backend/commands/subscriptioncmds.c | 8 ++++---- src/backend/replication/logical/sequencesync.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 013ac46db07..67f5699b2c7 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -3334,12 +3334,12 @@ check_publications_origin_sequences(WalReceiverConn *wrconn, List *publications, ereport(WARNING, errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("subscription \"%s\" requested copy_data with origin = NONE but might copy data that had a different origin", + errmsg("subscription \"%s\" requested origin = NONE but might synchronize sequence values that had a different origin", subname), - errdetail_plural("The subscription subscribes to a publication (%s) that contains sequences that are written to by other subscriptions.", - "The subscription subscribes to publications (%s) that contain sequences that are written to by other subscriptions.", + errdetail_plural("The subscription subscribes to a publication (%s) that contains sequences that are synchronized from other subscriptions.", + "The subscription subscribes to publications (%s) that contain sequences that are synchronized from other subscriptions.", list_length(publist), pubnames.data), - errhint("Verify that initial data copied from the publisher sequences did not come from other origins.")); + errhint("Verify that the initial values copied from the publisher sequences did not come from other origins.")); } ExecDropSingleTupleTableSlot(slot); diff --git a/src/backend/replication/logical/sequencesync.c b/src/backend/replication/logical/sequencesync.c index 0423745a428..ea24827aa9e 100644 --- a/src/backend/replication/logical/sequencesync.c +++ b/src/backend/replication/logical/sequencesync.c @@ -755,7 +755,7 @@ LogicalRepSyncSequences(void) /* * Lock the sequence so its identity (namespace and name) cannot * change under us via a concurrent DROP, RENAME or SET SCHEMA. The - * lock is released immediately rathen than at the transaction end. + * lock is released immediately rather than at the transaction end. * The later synchronization does not depend on this captured identity * remaining valid, as it re-opens the sequence and tolerates * concurrent changes. Releasing early also avoids holding one lock -- 2.50.1 (Apple Git-155)