Re: Skipping schema changes in publication
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@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>,
Dilip Kumar <dilipbalaut@gmail.com>, Amit Kapila <amit.kapila16@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-20T00:28:56Z
Lists: pgsql-hackers
A few of the recent function name change suggestions have originated from my internal review comments. But, these changes are not very effective unless they are done across existing functions as well to keep everything consistent. Background ---------- TBH, I always found many of the current HEAD names to be confusing. I am often having to double-check back with the function comment to find what was the intention. e.g. Here is a list of some existing function names of pg_publication.c. GetPubPartitionOptionRelations GetRelationPublications GetPublicationRelations GetAllTablesPublications GetAllPublicationRelations GetPublicationSchemas GetSchemaPublications GetSchemaPublicationRelations GetAllSchemaPublicationRelations GetPublication GetPublicationByName At the core of my confusion is that the pattern GetYyyyXxxx means 2 different things: - Sometimes the Yyyy is a search condition or "criteria" for what you are getting. e.g. GetRelationPublications means "Get publications that the specified relid is a member of" - sometimes the Yyyy is more like an "attribute" for what you are getting. e.g. GetAllTablesPublications means "Get all of the FOR ALL TABLES publications" Often there is some ambiguity: e.g GetAllPublicationRelations - does it mean "Get relations list equivalent to a FOR ALL TABLES publication"? - does it mean "Get relations that are members of all the specified publications"? e.g. GetSchemaPublications - does it mean "Get publications marked as FOR TABLES IN SCHEMA"? - does it mean "Get publications for the specified schemaid"? etc. ~~~ This thread's EXCEPT patch is not causing new problems, it's just adding yet more functions to the long list of those that I felt are ambiguous. IMO, when a function returns XXX, then the function name should be prefixed GetXXX. So, I would advocate for existing function names to change; something like below. GetPubPartitionOptionRelations -> GetRelsByRelidAndPartitionOpt GetRelationPublications -> GetPubsByRelid GetPublicationRelations -> GetRelsByPubidMarkedForTable GetAllTablesPublications -> GetPubsMarkedForAllTables GetAllPublicationRelations -> GetRelsOfPubsMarkedForAll GetPublicationSchemas -> GetSchemasByPubidMarkedForTablesInSchema GetSchemaPublications -> GetPubsMarkedForTablesInSchemaBySchemaid GetSchemaPublicationRelations -> GetPublishedRelsBySchemaid GetAllSchemaPublicationRelations -> GetRelsOfPubsMarkedForTablesInSchema GetPublication -> GetPubByPubid GetPublicationByName -> GetPubByName Then, any new (non-static) functions for this EXCEPT patch would be named similarly. ~ I understand that maybe everyone else feels the current names are fine as-is and not confusing at all. Or, maybe the confusion is recognised, but now is just not a good time of year to change everything. Anyway, I just wanted to give the background, and explain reasons for those function name suggestions. ====== Kind Regards, Peter Smith. Fujitsu Australia.
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