agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Reject sequence synchronization against pre-PostgreSQL 19 publis
2+ messages / 1 participants
[nested] [flat]

* pgsql: Reject sequence synchronization against pre-PostgreSQL 19 publis
@ 2026-07-23 05:23  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2026-07-23 05:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reject sequence synchronization against pre-PostgreSQL 19 publishers.

Sequence synchronization requires the page_lsn field returned by
pg_get_sequence_data(), which was added in PostgreSQL 19. Previously,
requesting sequence synchronization against an older publisher (via
ALTER SUBSCRIPTION ... REFRESH SEQUENCES or by running
ALTER SUBSCRIPTION ... CONNECTION on a disabled subscription with
sequences in the INIT state and subsequently enabling the subscription)
would cause the sequence synchronization worker to repeatedly fail with a
confusing "invalid query response" error.

Check the publisher's server version up front in both
AlterSubscription_refresh_seq() and copy_sequences(), and error out
immediately when it predates PostgreSQL 19.

Also document the PostgreSQL 19 publisher requirement for sequence
replication in the logical replication documentation and in
ALTER SUBSCRIPTION ... REFRESH SEQUENCES.

Reported-by: Noah Misch <noah@leadboat.com>
Author: vignesh C <vignesh21@gmail.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a8c172228db9f8ffd7add086e3b0a3cc4986b1c

Modified Files
--------------
doc/src/sgml/logical-replication.sgml          | 18 +++++++++++++++++-
doc/src/sgml/ref/alter_subscription.sgml       |  6 ++++++
src/backend/commands/subscriptioncmds.c        | 10 ++++++++++
src/backend/replication/logical/sequencesync.c | 10 ++++++++++
4 files changed, 43 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Reject sequence synchronization against pre-PostgreSQL 19 publis
@ 2026-07-23 05:23  Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Amit Kapila @ 2026-07-23 05:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Reject sequence synchronization against pre-PostgreSQL 19 publishers.

Sequence synchronization requires the page_lsn field returned by
pg_get_sequence_data(), which was added in PostgreSQL 19. Previously,
requesting sequence synchronization against an older publisher (via
ALTER SUBSCRIPTION ... REFRESH SEQUENCES or by running
ALTER SUBSCRIPTION ... CONNECTION on a disabled subscription with
sequences in the INIT state and subsequently enabling the subscription)
would cause the sequence synchronization worker to repeatedly fail with a
confusing "invalid query response" error.

Check the publisher's server version up front in both
AlterSubscription_refresh_seq() and copy_sequences(), and error out
immediately when it predates PostgreSQL 19.

Also document the PostgreSQL 19 publisher requirement for sequence
replication in the logical replication documentation and in
ALTER SUBSCRIPTION ... REFRESH SEQUENCES.

Reported-by: Noah Misch <noah@leadboat.com>
Author: vignesh C <vignesh21@gmail.com>
Reviewed-by: Shveta Malik <shveta.malik@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/57e7c52c0fe43fff36d0f4440eea13cf5668b160

Modified Files
--------------
doc/src/sgml/logical-replication.sgml          | 18 +++++++++++++++++-
doc/src/sgml/ref/alter_subscription.sgml       |  6 ++++++
src/backend/commands/subscriptioncmds.c        | 10 ++++++++++
src/backend/replication/logical/sequencesync.c | 10 ++++++++++
4 files changed, 43 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-07-23 05:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23 05:23 pgsql: Reject sequence synchronization against pre-PostgreSQL 19 publis Amit Kapila <akapila@postgresql.org>
2026-07-23 05:23 pgsql: Reject sequence synchronization against pre-PostgreSQL 19 publis Amit Kapila <akapila@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox