| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Kirk Wolak <wolakk(at)gmail(dot)com>, nik(at)postgres(dot)ai |
| Subject: | Re: Archive-fed logical decoding: pausing recovery on slot conflict |
| Date: | 2026-09-05 13:15:13 |
| Message-ID: | 7781AD24-1714-479C-8269-DA34F5FFDD24@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi hackers,
Here is v2. Self-review found that v1 advanced catalog_xmin from the
startup process once confirmed_flush_lsn reached the pause point. That
is not safe: confirmed output does not prove that logical decoding no
longer needs older catalog rows.
V2 leaves horizon advancement entirely to logical decoding and
auto-resumes only after the slot's effective horizons no longer
conflict. It now uses the same predicate as normal slot invalidation,
including both xmin horizons and shared catalogs. It also avoids
pausing before Hot Standby is active and prevents auto-resume from
overriding a separate manual pause.
There is an important limitation: a pause does not guarantee that every
slot can be preserved. If the WAL already replayed does not let logical
decoding derive a sufficiently recent safe horizon, the operator must
drop the slot or resume recovery and let it be invalidated.
The TAP test now uses one archive-only standby and covers automatic
resume, a concurrent manual pause, a shared-catalog conflict, and
promotion from the conflict pause.
PFA v2.
Thank you!
Best regards, Andrey Borodin.
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Pause-recovery-before-invalidating-logical-slots.patch | application/octet-stream | 19.0 KB |
| v2-0002-Test-recovery-pause-on-logical-slot-conflict.patch | application/octet-stream | 9.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2026-09-05 14:16:22 | Re: [PATCH] pg_surgery: check the page header and line pointers |
| Previous Message | shihao zhong | 2026-09-05 13:11:37 | [DOC] pg_database_size/pg_tablespace_size error on a missing OID |