Re: Skipping schema changes in publication
Peter Smith <smithpb2250@gmail.com>
From: Peter Smith <smithpb2250@gmail.com>
To: vignesh C <vignesh21@gmail.com>
Cc: "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>,
Amit Kapila <amit.kapila16@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-05-30T08:21:36Z
Lists: pgsql-hackers
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
Here are some minor review comments for v7-0001. ====== 1. General Probably the commit message and all the PG docs and code comments should be changed to refer to "publication parameters" instead of (currently) "publication options". This is because these things are really called "publication_parameters" in the PG docs [1]. All the following review comments are just examples of this suggestion. ~~~ 2. Commit message "includes resetting the publication options," -> "includes resetting the publication parameters," ~~~ 3. doc/src/sgml/ref/alter_publication.sgml + <para> + The <literal>RESET</literal> clause will reset the publication to the + default state which includes resetting the publication options, setting + <literal>ALL TABLES</literal> flag to <literal>false</literal> and + dropping all relations and schemas that are associated with the publication. </para> "resetting the publication options," -> "resetting the publication parameters," ~~~ 4. src/backend/commands/publicationcmds.c @@ -53,6 +53,14 @@ #include "utils/syscache.h" #include "utils/varlena.h" +/* CREATE PUBLICATION default values for flags and options */ +#define PUB_DEFAULT_ACTION_INSERT true +#define PUB_DEFAULT_ACTION_UPDATE true +#define PUB_DEFAULT_ACTION_DELETE true +#define PUB_DEFAULT_ACTION_TRUNCATE true +#define PUB_DEFAULT_VIA_ROOT false +#define PUB_DEFAULT_ALL_TABLES false "flags and options" -> "flags and publication parameters" ~~~ 5. src/backend/commands/publicationcmds.c +/* + * Reset the publication. + * + * Reset the publication options, setting ALL TABLES flag to false and drop + * all relations and schemas that are associated with the publication. + */ +static void +AlterPublicationReset(ParseState *pstate, AlterPublicationStmt *stmt, + Relation rel, HeapTuple tup) "Reset the publication options," -> "Reset the publication parameters," ~~~ 6. src/test/regress/sql/publication.sql +-- Verify that publish options and publish_via_partition_root option are reset +\dRp+ testpub_reset +ALTER PUBLICATION testpub_reset RESET; +\dRp+ testpub_reset SUGGESTION -- Verify that 'publish' and 'publish_via_partition_root' publication parameters are reset ------ [1] https://www.postgresql.org/docs/current/sql-createpublication.html Kind Regards, Peter Smith. Fujitsu Australia