Re: Added schema level support for publication.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Smith <smithpb2250(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Subject: Re: Added schema level support for publication.
Date: 2021-09-24 04:59:02
Message-ID: CALDaNm1R-xbQvz4LU5OXu3KKwbWOz3uDcT_YjRU6V0R5FZDYDg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 22, 2021 at 6:57 AM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
>
> On Wed, Sep 22, 2021 at 4:02 AM vignesh C <vignesh21(at)gmail(dot)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

Attachment Content-Type Size
v32-0001-Added-schema-level-support-for-publication.patch text/x-patch 75.2 KB
v32-0002-Client-side-changes-to-support-FOR-ALL-TABLES-IN.patch text/x-patch 21.6 KB
v32-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication.patch text/x-patch 52.2 KB
v32-0004-Documentation-for-FOR-ALL-TABLES-IN-SCHEMA-publi.patch text/x-patch 15.2 KB
v32-0005-Implemented-pg_publication_objects-view.patch text/x-patch 6.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-09-24 05:02:24 Re: Added schema level support for publication.
Previous Message Platon Pronko 2021-09-24 04:49:32 Re: very long record lines in expanded psql output