Re: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION" - Mailing list pgsql-bugs

From Amit Kapila
Subject Re: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"
Date
Msg-id CAA4eK1+MNeeNyo-Jzd7GCkhSncsNU6PsMqVbYbANXQDug9rUcA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"  (Amit Kapila <amit.kapila16@gmail.com>)
Responses RE: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"
List pgsql-bugs
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.



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17136: set shared_preload_libraries = 'pg_stat_statements,pg_prewarm,pg_trgm' , postgresql Cannot Startup
Next
From: Andrey Lepikhov
Date:
Subject: SEGFAULT on a concurrent UPDATE of mix of local and foreign partitions