Re: Dropping publication breaks logical replication - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Dropping publication breaks logical replication
Date
Msg-id CAExHW5viuRMsmg7DtFi0G=eaBrVVknNk5MdDh4YRk-YjEErT3A@mail.gmail.com
Whole thread Raw
In response to Re: Dropping publication breaks logical replication  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
Hi Vignesh,
Thanks for the patches.

On Sat, Aug 2, 2025 at 7:10 PM vignesh C <vignesh21@gmail.com> wrote:

> >
> > The backport seems to be straight forward. Please let me know if you
> > need my help in doing so, if we decide to backport the fix.
>
> Now that this has been reported on the back branches, we should
> consider whether it's appropriate to backport the fix. Here are the
> patches prepared for the back branches.

PG14 and + patches do not test that DROP PUBLICATION does not disrupt
the publication. I think we need to test that as well.

PG13 tests DROP PUBLICATION OTOH. That's good. I think it has a race
condition because +my $offset = -s $node_publisher->logfile; is
executed after dropping the publication. If some background change
triggers publication validation before capturing the file offset, we
might miss the WARNING and the test will fail. Instead capturing
offset before dropping publication may be safer - the publication
exists till it dropped, so the log file cannot have WARNING in there
when offset is captured.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Tender Wang
Date:
Subject: Re: A little cosmetic to convert_VALUES_to_ANY()
Next
From: Michael Paquier
Date:
Subject: Re: [PATCH] Proposal to Enable/Disable Index using ALTER INDEX