Re: Added schema level support for publication.
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Greg Nancarrow <gregn4422@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Masahiko Sawada <sawada.mshk@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Peter Smith <smithpb2250@gmail.com>,
"tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Ajin Cherian <itsajin@gmail.com>, Rahila Syed <rahilasyed90@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Date: 2021-09-24T04:59:02Z
Lists: pgsql-hackers
Attachments
- v32-0001-Added-schema-level-support-for-publication.patch (text/x-patch) patch v32-0001
- v32-0002-Client-side-changes-to-support-FOR-ALL-TABLES-IN.patch (text/x-patch) patch v32-0002
- v32-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication.patch (text/x-patch) patch v32-0003
- v32-0004-Documentation-for-FOR-ALL-TABLES-IN-SCHEMA-publi.patch (text/x-patch) patch v32-0004
- v32-0005-Implemented-pg_publication_objects-view.patch (text/x-patch) patch v32-0005
On Wed, Sep 22, 2021 at 6:57 AM Greg Nancarrow <gregn4422@gmail.com> wrote: > > On Wed, Sep 22, 2021 at 4:02 AM vignesh C <vignesh21@gmail.com> wrote: > > > > Attached v30 patch has the fixes for the same. > > > > Thanks for all the patch updates. > I have some suggested updates to the v30-0005 documentation patch: > > doc/src/sgml/ref/alter_publication.sgml > (1) > I'm thinking it might be better to simplify the description, because > it's a bit wordy and difficult to read with the "all tables in schema" > bits. > Suggested update is below (thoughts?): > > BEFORE: > + The first three variants change which tables and/or all tables in schema are > + part of the publication. The <literal>SET</literal> clause will replace > + the list of tables and/or all tables in schema in the publication with the > + specified one, the existing tables and all tables in schema that were > + present in the publication will be removed. The <literal>ADD</literal> > + clause will add one or more tables and/or all tables in schema to the > + publication. The <literal>DROP</literal> clauses will remove one or more > + tables and/or all tables in schema from the publication. Note that adding > + tables and/or all tables in schema to a publication that is already > + subscribed to will require a <literal>ALTER SUBSCRIPTION ... > REFRESH PUBLICATION</literal> > + action on the subscribing side in order to become effective. > AFTER: > + The first three variants change which tables/schemas are > + part of the publication. The <literal>SET</literal> clause will replace > + the list of tables/schemas in the publication with the > + specified list; the existing tables/schemas that were > + present in the publication will be removed. The <literal>ADD</literal> > + clause will add one or more tables/schemas to the > + publication. The <literal>DROP</literal> clauses will remove one or more > + tables/schemas from the publication. Note that adding > + tables/schemas to a publication that is already > + subscribed to will require a <literal>ALTER SUBSCRIPTION ... > REFRESH PUBLICATION</literal> > + action on the subscribing side in order to become effective. Modified > > doc/src/sgml/ref/create_publication.sgml > (2) > I suggest an update similar to the following: > > BEFORE: > + Specifying a table that is part of schema specified in > + <literal>FOR ALL TABLES IN SCHEMA</literal> option is not supported. > AFTER: > + Specifying a table that is part of a schema already included in > the publication is not supported. This doc content is for the following example: create publication pub1 for all tables in schema sch1, table sch1.t1; It is about the schema specified in all tables in schema option along with table option. I think the existing content is better. > (3) > I find the following description a little unclear: > > + <para> > + Specifying a schema along with schema's table specified as part of > + <literal>FOR TABLE</literal> option is not supported. > + </para> > > Perhaps the following would be better: > > + <para> > + Specifying a schema that contains a table already included in the > + publication is not supported. > + </para> Similar to above > (4) > Minor fix: > BEFORE: > + rights on the table. The <command>FOR ALL TABLES</command> and > + <command>FOR ALL TABLES IN SCHEMA</command> clause requires the invoking > + user to be a superuser. > AFTER: > + rights on the table. The <command>FOR ALL TABLES</command> and > + <command>FOR ALL TABLES IN SCHEMA</command> clauses require the invoking > + user to be a superuser. Modified Attached v32 patch has the fixes for the same. Regards, Vignesh
Commits
-
Include schema/table publications even with exclude options in dump.
- 4aa6fa3cd0a2 18.0 landed
-
Rename some enums to use TABLE instead of REL.
- b3812d0b9bcf 15.0 landed
-
Add tap tests for the schema publications.
- 6b0f6f79eef2 15.0 landed
-
Allow publishing the tables of schema.
- 5a2832465fd8 15.0 landed
-
In pg_dump, use simplehash.h to look up dumpable objects by OID.
- 92316a4582a5 15.0 cited