Re: Add support for specifying tables in pg_createsubscriber. - Mailing list pgsql-hackers

From Chao Li
Subject Re: Add support for specifying tables in pg_createsubscriber.
Date
Msg-id BEC689F3-8A30-47AE-92FC-AA786F3FA464@gmail.com
Whole thread Raw
In response to Re: Add support for specifying tables in pg_createsubscriber.  (Shubham Khanna <khannashubham1197@gmail.com>)
Responses Re: Add support for specifying tables in pg_createsubscriber.
List pgsql-hackers


On Sep 25, 2025, at 16:18, Shubham Khanna <khannashubham1197@gmail.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/




pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Inconsistent Behavior of GROUP BY ROLLUP in v17 vs master
Next
From: vignesh C
Date:
Subject: Re: Skipping schema changes in publication