agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Fix issues in logical replication sequence synchronization. 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix issues in logical replication sequence synchronization. @ 2026-07-27 03:45 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2026-07-27 03:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issues in logical replication sequence synchronization. 1. Stop a running sequence synchronization worker when ALTER SUBSCRIPTION ... DISABLE is executed. The worker did not reread its subscription after starting a transaction, so it kept running with a stale copy and missed the disable. It now calls maybe_reread_subscription() after StartTransactionCommand(), matching the apply worker. 2. Restore the invariant that publisher-side synchronization slots are dropped last during ALTER SUBSCRIPTION ... REFRESH PUBLICATION. The slot-drop loop now runs after the sequence-removal loop, so the non-transactional slot drops happen only after all catalog changes that could still be rolled back on error. 3. Restore psql tab completion for ALTER SUBSCRIPTION ... REFRESH PUBLICATION WITH (. 4. Make pg_stat_subscription report NULL for the fields that do not apply to a sequence synchronization worker, which does not stream from a walsender, and update the documentation accordingly. 5. Update the pg_subscription_rel.srsublsn catalog documentation to describe its semantics for sequence rows. Reported-by: Noah Misch <noah@leadboat.com> Author: vignesh C <vignesh21@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 19, where it was introduced Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b8d9cf512c1259f97f9896593cc1c8352c1118ac Modified Files -------------- doc/src/sgml/catalogs.sgml | 6 ++- doc/src/sgml/monitoring.sgml | 19 +++++---- src/backend/commands/subscriptioncmds.c | 56 +++++++++++++------------- src/backend/replication/logical/sequencesync.c | 2 + src/backend/replication/logical/worker.c | 14 ++++++- src/bin/psql/tab-complete.in.c | 3 ++ 6 files changed, 61 insertions(+), 39 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix issues in logical replication sequence synchronization. @ 2026-07-27 03:45 Amit Kapila <akapila@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Amit Kapila @ 2026-07-27 03:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issues in logical replication sequence synchronization. 1. Stop a running sequence synchronization worker when ALTER SUBSCRIPTION ... DISABLE is executed. The worker did not reread its subscription after starting a transaction, so it kept running with a stale copy and missed the disable. It now calls maybe_reread_subscription() after StartTransactionCommand(), matching the apply worker. 2. Restore the invariant that publisher-side synchronization slots are dropped last during ALTER SUBSCRIPTION ... REFRESH PUBLICATION. The slot-drop loop now runs after the sequence-removal loop, so the non-transactional slot drops happen only after all catalog changes that could still be rolled back on error. 3. Restore psql tab completion for ALTER SUBSCRIPTION ... REFRESH PUBLICATION WITH (. 4. Make pg_stat_subscription report NULL for the fields that do not apply to a sequence synchronization worker, which does not stream from a walsender, and update the documentation accordingly. 5. Update the pg_subscription_rel.srsublsn catalog documentation to describe its semantics for sequence rows. Reported-by: Noah Misch <noah@leadboat.com> Author: vignesh C <vignesh21@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Backpatch-through: 19, where it was introduced Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/d2768065a979ffad11e2ee650b9fa9fd95168a8b Modified Files -------------- doc/src/sgml/catalogs.sgml | 6 ++- doc/src/sgml/monitoring.sgml | 19 +++++---- src/backend/commands/subscriptioncmds.c | 56 +++++++++++++------------- src/backend/replication/logical/sequencesync.c | 2 + src/backend/replication/logical/worker.c | 14 ++++++- src/bin/psql/tab-complete.in.c | 3 ++ 6 files changed, 61 insertions(+), 39 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-27 03:45 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-27 03:45 pgsql: Fix issues in logical replication sequence synchronization. Amit Kapila <akapila@postgresql.org> 2026-07-27 03:45 pgsql: Fix issues in logical replication sequence synchronization. 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