Hi, On Wed, Nov 4, 2026 at 6:01 PM Amit Kapila <[email protected]> wrote: > > On Thu, Oct 29, 2026 at 8:44 PM Zhijie Hou <[email protected]> wrote: > > > > On Thu, Oct 29, 2026 at 06:41 PM Bertrand Drouvot wrote: > > > It might be worth fixing, as preserving 'e' only when slot_name is > > > unchanged > > > should be simple enough. > > > > I don't think handling that here would be simple. Resetting ENABLED to > > PENDING when slot_name is changed would re-introduce the same bugs that > > this patch aims to fix: prepared transactions from the previous slot may > > still exist on the subscriber, and if the replacement slot already has > > two_phase enabled on the publisher, prepared transactions could again be > > streamed concurrently with table synchronization. Avoiding that would > > require checking prepared transactions and the remote slot's status > > during the change, which would complicate the fix. > > > > I agree that we don't need to preserve the old behavior as it will > open up other bugs and we already document that such slot's properties > should match subscription's options. But I feel we should add that > change in behavior for new slot's in the commit message. Other than > that the latest patch in this thread looks good to me.
I added a section describing this behavior change, please see the attached V3 patch. I confirmed the patch applies cleanly to all affected branches (PG 18 through HEAD), and the tests pass on all of them. -- Best Regards, Zhijie Hou
v3-0001-Avoid-resetting-subscription-two_phase-state-to-p.patch
Description: Binary data
