> [1] -
https://www.postgresql.org/message-id/OS0PR01MB5716935D4C2CC85A6143073F94EF9%40OS0PR01MB5716.jpnprd01.prod.outlook.com
Sorry for the late replay and thank you for your answer. I will track this thread to confirm whether the problem is
solved.
--
Best regards,
ChenJiaoqian
-----Original Message-----
From: Amit Kapila <amit.kapila16@gmail.com>
Sent: Friday, August 6, 2021 1:24 PM
To: Chen, Jiaoqian/陈 娇倩 <chenjq.jy@fujitsu.com>; PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"
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'sgoing, in this case, is that even after the drop publication, the corresponding relation (test2) is not removed
fromthe 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
suggestyou 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.