Re: Added schema level support for publication.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Greg Nancarrow <gregn4422(at)gmail(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>, 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>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Added schema level support for publication.
Date: 2021-10-11 15:01:33
Message-ID: CALDaNm1YuVqA=HSz-bg77PJEoexbE3ckc1dzF1cKWZMLG14Avg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 11, 2021 at 12:50 PM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Monday, October 11, 2021 2:39 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > These comments are fixed in the v38 patch attached.
>
> Thanks for updating the patches.
> Here are a few comments on the v38-0004-Doc patch.
>
> 1.
> + <para>
> + Adding/Setting a table that is part of schema specified in
> + <literal>ALL TABLES IN SCHEMA</literal>, adding/setting a schema to a
> + publication along with same schema's table specified with
> + <literal>TABLE</literal>, adding/setting a schema to a publication that
> + already has a table that is part of specified schema or adding/setting a
> + table to a publication that already has a table's schema as part of
> + specified schema is not supported.
>
> ISTM we can remove the description "adding/setting a schema to a publication
> along with same schema's table specified with <literal>TABLE</literal>",
> because it seems the same as the first mentioned case "Adding/Setting a table
> that is part of schema specified in <literal>ALL TABLES IN SCHEMA</literal>"

Modified

> 2.
>
> +</programlisting></para>
> +
> + <para>
> + Add some schemas to the publication:
> +<programlisting>
> +ALTER PUBLICATION sales_publication ADD ALL TABLES IN SCHEMA marketing_june, sales_june;
> +</programlisting>
> + </para>
> +
> + <para>
> + Add some tables and schemas to the publication:
> ...
> +
> + <para>
> + Drop some schemas from the publication:
> ...
> + <para>
> + Set some schemas to the publication:
> +<programlisting>
> +ALTER PUBLICATION production_publication SET ALL TABLES IN SCHEMA production_september, production_october;
>
> Personally, I think we don't need the example about DROP and SET here.
> The example of ADD seems sufficient.

Modified

> 3.
> +</programlisting>
> + </para>
> +
> + <para>
> + Create a publication that publishes all changes for all the tables present in
> + the schema "production":
> +<programlisting>
> +CREATE PUBLICATION production_publication FOR ALL TABLES IN SCHEMA production;
> +</programlisting>
> + </para>
> ...
> + <para>
> + Create a publication that publishes all changes for all the tables present in
> + the schemas "marketing" and "sales":
> +<programlisting>
> +CREATE PUBLICATION sales_publication FOR ALL TABLES IN SCHEMA marketing, sales;
>
> I think the example for publishing all the tables in schemas "marketing" and
> "sales" is sufficient, the example for pulishing signal schema seems can be
> removed.

Modified

The attached v39 patch has the fixes for the above issues.

Regards,
Vignesh

Attachment Content-Type Size
v39-0001-Added-schema-level-support-for-publication.patch text/x-patch 79.3 KB
v39-0002-Client-side-changes-to-support-FOR-ALL-TABLES-IN.patch text/x-patch 21.6 KB
v39-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication.patch text/x-patch 57.5 KB
v39-0004-Documentation-for-FOR-ALL-TABLES-IN-SCHEMA-publi.patch text/x-patch 14.7 KB
v39-0005-Implemented-pg_publication_objects-view.patch text/x-patch 6.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-10-11 15:03:35 Re: pgsql: Adjust configure to insist on Perl version >= 5.8.3.
Previous Message Stephen Frost 2021-10-11 15:00:58 Re: Proposal: allow database-specific role memberships