diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 2ac63c7..c595873 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -2546,6 +2546,7 @@ fetch_sequence_list(WalReceiverConn *wrconn, List *publications) seqform = (Form_pg_sequence) GETSTRUCT(tup); + /* Build a list of sequences that don't match in publisher and subscriber */ if (seqform->seqtypid != seqtypid || seqform->seqmin != seqmin || seqform->seqmax != seqmax || seqform->seqstart != seqstart || seqform->seqincrement != seqincrement || @@ -2556,7 +2557,6 @@ fetch_sequence_list(WalReceiverConn *wrconn, List *publications) else appendStringInfoString(warning_sequences, ", "); - /* Add the sequences that don't match in publisher and subscriber */ appendStringInfo(warning_sequences, "\"%s.%s\"", get_namespace_name(get_rel_namespace(relid)), get_rel_name(relid)); @@ -2575,7 +2575,7 @@ fetch_sequence_list(WalReceiverConn *wrconn, List *publications) */ ereport(WARNING, errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("Sequence parameter in remote and local is not same for %s", + errmsg("Parameters differ for remote and local sequences %s", warning_sequences->data), errhint("Alter/Re-create the sequence using the same parameter as in remote.")); pfree(warning_sequences); diff --git a/src/test/subscription/t/034_sequences.pl b/src/test/subscription/t/034_sequences.pl index 7cc8c8c..52453cc 100644 --- a/src/test/subscription/t/034_sequences.pl +++ b/src/test/subscription/t/034_sequences.pl @@ -177,7 +177,7 @@ $node_subscriber->safe_psql( ALTER SUBSCRIPTION regress_seq_sub REFRESH PUBLICATION SEQUENCES"); like( $stderr, - qr/WARNING: ( [A-Z0-9]+:)? Sequence parameter in remote and local is not same for "public.regress_s4"/, + qr/WARNING: ( [A-Z0-9]+:)? Parameters differ for remote and local sequences "public.regress_s4"/, "Refresh publication sequences should throw a warning if the sequence definition is not the same" );