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-12 13:15:02
Message-ID: CALDaNm2NN8UFupYUiN9iSOw=PzSuCS7Y_bmZNaK49MqO=555KA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 12, 2021 at 12:24 PM houzj(dot)fnst(at)fujitsu(dot)com
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Monday, October 11, 2021 11:02 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > The attached v39 patch has the fixes for the above issues.
>
> Thanks for the updates.
> I have a few minor suggestions about the testcases in the v39-0003-Test patch.
>
> 1)
> +-- alter publication drop CURRENT_SCHEMA
> +ALTER PUBLICATION testpub1_forschema DROP ALL TABLES IN SCHEMA CURRENT_SCHEMA;
> +\dRp+ testpub1_forschema
>
> Since we already tested CURRENT_SCHEMA in various CREATE PUBLICATION cases, maybe
> we don't need to test it again in SET/DROP/ADD cases.

Modified

> 2)
> +-- alter publication set schema
> +ALTER PUBLICATION testpub1_forschema SET ALL TABLES IN SCHEMA pub_test1;
> +\dRp+ testpub1_forschema
> +
> +-- alter publication set multiple schema
> +ALTER PUBLICATION testpub1_forschema SET ALL TABLES IN SCHEMA pub_test1, pub_test2;
> +\dRp+ testpub1_forschema
> +
>
> I think the multiple schemas testcase is sufficient, maybe we can remove the
> single schema case.

Modified

> 3)
> +
> +-- alter publication set it with the same schema
> +ALTER PUBLICATION testpub1_forschema SET ALL TABLES IN SCHEMA pub_test1, pub_test2;
> +\dRp+ testpub1_forschema
>
> ISTM, we didn't have some special code path for this case, maybe we can remove
> this testcase.

Modified

Attached v40 patch has the fix for the above comments.

Regards,
Vignesh

Attachment Content-Type Size
v40-0001-Added-schema-level-support-for-publication.patch text/x-patch 79.3 KB
v40-0002-Client-side-changes-to-support-FOR-ALL-TABLES-IN.patch text/x-patch 21.6 KB
v40-0003-Tests-for-FOR-ALL-TABLES-IN-SCHEMA-publication.patch text/x-patch 54.1 KB
v40-0004-Documentation-for-FOR-ALL-TABLES-IN-SCHEMA-publi.patch text/x-patch 14.7 KB
v40-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 Peter Eisentraut 2021-10-12 13:30:57 Re: [RFC] building postgres with meson
Previous Message Bruce Momjian 2021-10-12 13:14:12 Re: storing an explicit nonce