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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: 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"
Date: 2021-08-06 05:23:55
Message-ID: CAA4eK1+MNeeNyo-Jzd7GCkhSncsNU6PsMqVbYbANXQDug9rUcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrey Lepikhov 2021-08-06 05:34:30 SEGFAULT on a concurrent UPDATE of mix of local and foreign partitions
Previous Message PG Bug reporting form 2021-08-06 03:17:40 BUG #17136: set shared_preload_libraries = 'pg_stat_statements,pg_prewarm,pg_trgm' , postgresql Cannot Startup