Fix concurrent sequence drops during sequence synchronization.
Amit Kapila <akapila@postgresql.org>
Fix concurrent sequence drops during sequence synchronization. A recent BF failure showed that commit 7a485bd641 did not handle the case where a sequence is dropped concurrently during sequence synchronization on the subscriber. Previously, pg_get_sequence_data() would ERROR out if the sequence was dropped concurrently. After 7a485bd641, it instead returns NULL, which leads to an assertion failure on the subscriber. To handle this change, update sequence synchronization to skip sequences for which pg_get_sequence_data() returns NULL. Author: vignesh C <vignesh21@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://postgr.es/m/CALDaNm0FoGdt+1mzua0t-=wYdup5_zmFrvfNf-L=MGBnj9HAcg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/logical/sequencesync.c | modified | +25 −8 |
Discussion
- Logical Replication of sequences 507 messages · 2024-06-04 → 2026-01-20