RE: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"

From: "chenjq(dot)jy(at)fujitsu(dot)com" <chenjq(dot)jy(at)fujitsu(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"
Date: 2021-08-16 02:13:53
Message-ID: OSZPR01MB6277EF536E4901F9183049E9F1FD9@OSZPR01MB6277.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> [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(dot)kapila16(at)gmail(dot)com>
Sent: Friday, August 6, 2021 1:24 PM
To: Chen, Jiaoqian/陈 娇倩 <chenjq(dot)jy(at)fujitsu(dot)com>; PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17132: About "ALTER SUBSCRIPTION ... ADD/DROP PUBLICATION"

On Thu, Aug 5, 2021 at 6:54 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Aug 5, 2021 at 2:19 PM PG Bug reporting form
> <noreply(at)postgresql(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2021-08-16 05:13:17 Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data
Previous Message PG Bug reporting form 2021-08-15 17:30:52 BUG #17146: pg_dump statements are going into pg_stat_statements in 13.4