agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Handle concurrent sequence drops during synchronization 2+ messages / 1 participants [nested] [flat]
* pgsql: Handle concurrent sequence drops during synchronization @ 2026-07-16 15:52 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-07-16 15:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Handle concurrent sequence drops during synchronization Commit d4a657b0a4d added a call to has_sequence_privilege() while fetching sequence information from the publisher, so that publisher-side permission failures could be distinguished from missing sequences. It also assumed that has_sequence_privilege() could never return NULL, and asserted accordingly. However, that assumption was incorrect. If a sequence is dropped after the synchronization worker collects its metadata but while fetching the sequence information, has_sequence_privilege() can return NULL. This can trigger the assertion failure. This was also reported in a buildfarm failure on member culicidae. Fix this by treating a NULL result from has_sequence_privilege() as indicating that the sequence was dropped concurrently, and report it as a missing sequence instead of asserting that the result is never NULL. Reported-by: Noah Misch <noah@leadboat.com> Author: Vignesh C <vignesh21@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com Discussion: https://postgr.es/m/CALDaNm2fHGLeiQKj0r6OG7N9QeayxSmpLrWYJRyt4dL_m3VRWw@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/55f518684895bfe43e667acf59284b49707ee685 Modified Files -------------- src/backend/replication/logical/sequencesync.c | 15 +++++-- src/test/subscription/t/036_sequences.pl | 56 +++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Handle concurrent sequence drops during synchronization @ 2026-07-16 15:52 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-07-16 15:52 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Handle concurrent sequence drops during synchronization Commit d4a657b0a4d added a call to has_sequence_privilege() while fetching sequence information from the publisher, so that publisher-side permission failures could be distinguished from missing sequences. It also assumed that has_sequence_privilege() could never return NULL, and asserted accordingly. However, that assumption was incorrect. If a sequence is dropped after the synchronization worker collects its metadata but while fetching the sequence information, has_sequence_privilege() can return NULL. This can trigger the assertion failure. This was also reported in a buildfarm failure on member culicidae. Fix this by treating a NULL result from has_sequence_privilege() as indicating that the sequence was dropped concurrently, and report it as a missing sequence instead of asserting that the result is never NULL. Reported-by: Noah Misch <noah@leadboat.com> Author: Vignesh C <vignesh21@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com Discussion: https://postgr.es/m/CALDaNm2fHGLeiQKj0r6OG7N9QeayxSmpLrWYJRyt4dL_m3VRWw@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/24a2b541bd450a2db9d8f3ddefc92ace58ef9a42 Modified Files -------------- src/backend/replication/logical/sequencesync.c | 15 +++++-- src/test/subscription/t/036_sequences.pl | 56 +++++++++++++++++++++++++- 2 files changed, 67 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-16 15:52 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-16 15:52 pgsql: Handle concurrent sequence drops during synchronization Fujii Masao <fujii@postgresql.org> 2026-07-16 15:52 pgsql: Handle concurrent sequence drops during synchronization Fujii Masao <fujii@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