pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add error context for sequence synchronization.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Add error context for sequence synchronization.
@ 2026-10-22 05:22 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

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

Add error context for sequence synchronization.

An unhandled ERROR while synchronizing a sequence (for example, when
SwitchToUntrustedUser() fails because the subscription owner cannot SET
ROLE to the sequence owner) makes the sequencesync worker exit and be
restarted, repeatedly, until the user resolves the problem, as with the
apply worker. The error message does not identify the sequence or
subscription responsible.

Add an error context callback around per-sequence validation and
synchronization in copy_sequences() so that such errors report the
schema-qualified sequence name and subscription name in CONTEXT.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Author: Zhijie Hou <houzhijie22@gmail.com>
Reviewed-by: Ajin Cherian <itsajin@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CAN4CZFMGiyksxVD1M7cc7_5E+evfi51xmDxw4uqdmvoeH53Ugw@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/219334a2252729054db98288df64e61b2968f2b7

Modified Files
--------------
src/backend/replication/logical/sequencesync.c | 32 ++++++++++++++++-
src/test/subscription/t/036_sequences.pl       | 50 ++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 1 deletion(-)



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

* pgsql: Add error context for sequence synchronization.
@ 2026-10-22 05:22 Amit Kapila <akapila@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

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

Add error context for sequence synchronization.

An unhandled ERROR while synchronizing a sequence (for example, when
SwitchToUntrustedUser() fails because the subscription owner cannot SET
ROLE to the sequence owner) makes the sequencesync worker exit and be
restarted, repeatedly, until the user resolves the problem, as with the
apply worker. The error message does not identify the sequence or
subscription responsible.

Add an error context callback around per-sequence validation and
synchronization in copy_sequences() so that such errors report the
schema-qualified sequence name and subscription name in CONTEXT.

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Author: Zhijie Hou <houzhijie22@gmail.com>
Reviewed-by: Ajin Cherian <itsajin@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CAN4CZFMGiyksxVD1M7cc7_5E+evfi51xmDxw4uqdmvoeH53Ugw@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/215af457aef9b9d0095d2333d126ab817406e9be

Modified Files
--------------
src/backend/replication/logical/sequencesync.c | 32 ++++++++++++++++-
src/test/subscription/t/036_sequences.pl       | 50 ++++++++++++++++++++++++++
2 files changed, 81 insertions(+), 1 deletion(-)



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


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

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22 05:22 pgsql: Add error context for sequence synchronization. Amit Kapila <akapila@postgresql.org>
2026-10-22 05:22 pgsql: Add error context for sequence synchronization. Amit Kapila <akapila@postgresql.org>

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