On Thu, Aug 5, 2021 at 6:54 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Thu, Aug 5, 2021 at 2:19 PM PG Bug reporting form
> <noreply@postgresql.org> wrote:
> >
> > I think ADD/DROP and SET clause are similar, shouldn't the data in the
> > table be consistent after re-adding the dropped publication?
> >
>
> Yeah, I think the result should be the same for both cases. The SET
> seems to behave as per expectation. BTW, recently there is another bug
> reported for ADD/DROP Publication [1], you might want to check the
> discussion and patch on that thread. It is quite possible that is a
> different issue but there is no harm in looking at it.
>
I have checked and found that this is related to the bug we are
discussing on -hackers [1] as speculated by me. Now, what's going, in
this case, is that even after the drop publication, the corresponding
relation (test2) is not removed from the subscription list (verified
the same in pg_subscription_rel). So, next time, when you tried to add
the publication, it won't do anything special for the relation (test2)
as it is already part of the subscription. So, I suggest you keep an
eye on that thread [1] and see if the final patch resolves the problem
reported here as well.
[1] -
https://www.postgresql.org/message-id/OS0PR01MB5716935D4C2CC85A6143073F94EF9%40OS0PR01MB5716.jpnprd01.prod.outlook.com
--
With Regards,
Amit Kapila.