Re: Skipping schema changes in publication
Dilip Kumar <dilipbalaut@gmail.com>
From: Dilip Kumar <dilipbalaut@gmail.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>, vignesh C <vignesh21@gmail.com>, "David G. Johnston" <david.g.johnston@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>, Peter Smith <smithpb2250@gmail.com>,
"Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, YeXiu <1518981153@qq.com>, Ian Lawrence Barwick <barwick@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-02-19T10:38:01Z
Lists: pgsql-hackers
On Thu, Feb 19, 2026 at 10:13 AM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
> Thanks for reviewing the patch. I have addressed the remaining
> comments in the v46 patch..
>
I am looking at the latest version some questions/comments
1.
GetRelationPublications()
{
..
for (int i = 0; i < pubrellist->n_members; i++)
{
+ if (pubrel->prexcept)
+ {
+ if (except_pubids)
+ *except_pubids = lappend_oid(*except_pubids, pubid);
+ }
+ else
+ {
+ if (pubids)
+ *pubids = lappend_oid(*pubids, pubid);
+ found = true;
+ }
}
Can we simplify this multi-level check to something simple by using
some temporary variable?
Suggestions:
for (int i = 0; i < pubrellist->n_members; i++)
{
List **target_list = pubrel->prexcept ? except_pubids : pubids;
if (target_list)
*target_list = lappend_oid(*target_list, pubid);
if (!pubrel->prexcept)
found = true;
}
2.
-extern List *GetPublicationRelations(Oid pubid, PublicationPartOpt
pub_partopt);
+extern List *GetIncludedRelationsByPub(Oid pubid,
+ PublicationPartOpt pub_partopt);
I don't really like renaming this function, IMHO the
GetPublicationRelations() means all the published relation, we don't
need to be explicit about *Included* relation. Then I see we have
another function to fetch the excluded relation i.e.
GetExcludedTablesByPub() so maybe this makes sense considering we have
a requirement for fetching included as well as excluded.
3. Question, what would be the behavior of
pg_get_publication_tables(), if we have created PUBLICATION FOR ALL
TABLES with EXCEPT, I assume it will give all table even in the EXCEPT
list as we have another function to get effective tables i.e.
pg_get_publication_effective_tables(), so my question is are we
planning to add an additional field in pg_get_publication_tables() to
explicitly mention that the table is EXCLUDED?
--
Regards,
Dilip Kumar
Google
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix miscellaneous issues in EXCEPT publication clause.
- 6b0550c45d13 19 (unreleased) landed
-
Change syntax of EXCEPT TABLE clause in publication commands.
- 5984ea868eee 19 (unreleased) landed
-
Add support for EXCEPT TABLE in ALTER PUBLICATION.
- 493f8c6439cf 19 (unreleased) landed
-
Allow table exclusions in publications via EXCEPT TABLE.
- fd366065e06a 19 (unreleased) landed
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited