Re: Add support for specifying tables in pg_createsubscriber.

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Shubham Khanna <khannashubham1197(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add support for specifying tables in pg_createsubscriber.
Date: 2025-09-25 08:36:16
Message-ID: BEC689F3-8A30-47AE-92FC-AA786F3FA464@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Sep 25, 2025, at 16:18, Shubham Khanna <khannashubham1197(at)gmail(dot)com> wrote:
>>
>>
>> made_publication will always be set regardless of dry_run.
>>
>
> You’re right — I made a mistake in my earlier explanation.
> made_publication is always set in create_publication(), regardless of
> dry-run. I have double-checked the dry-run output across the cases,
> and from what I can see the messages are being logged correctly.
>
> If you think there’s a specific combination where the dry-run logging
> isn’t behaving as expected, could you point me to it? From my testing
> it looks fine, but I want to be sure I’m not missing a corner case.
>

I think, here you code has a logic difference from the old code:

* With the old code, even if drop_all_pubs, as long as dry_run, it will still run drop_publication().
* With your code, if drop_all_pubs, then never run drop_publication(), because you moved the logic into “else”.

To be honest, I am not 100% sure which is correct, I am just pointing out the difference.

Regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2025-09-25 08:48:04 Re: Skipping schema changes in publication
Previous Message Richard Guo 2025-09-25 08:27:57 Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master