Re: Added schema level support for publication.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: "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-07-16 10:13:11
Message-ID: CALDaNm1ZBPLNhribHw8cu1DUX9LkZNjksVyjR-h68gmC3+uoKg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 16, 2021 at 9:25 AM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
>
> On Wed, Jul 14, 2021 at 8:17 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > Thanks for your comments, the attached v11 patch fixes the issues.
> >
>
> Thanks for your work on this.
>
> I have some minor review comments on the documentation:
>
> (1) wrong link (uses altersubscription instead of alterpublication)
> doc/src/sgml/catalogs.sgml
>
> BEFORE:
> + created as an empty publication type. When a table or schema is
added to
> + the publication using <link linkend="sql-altersubscription">
> + <command>ALTER PUBLICATION</command></link> then the publication
type
>
> AFTER:
> + created as an empty publication type. When a table or schema is
added to
> + the publication using <link linkend="sql-alterpublication">
> + <command>ALTER PUBLICATION</command></link> then the publication
type

Modified.

> (2) Improve wording and suggest "or" instead of "and"
> doc/src/sgml/catalogs.sgml
>
> BEFORE:
> + If a publication is created without specifying any of
> + <literal>FOR ALL TABLES</literal>, <literal>FOR TABLE</literal>
and
> + <literal>FOR SCHEMA</literal> option, then the publication will be
>
> AFTER:
> + If a publication is created without specifying any of the
> + <literal>FOR ALL TABLES</literal>, <literal>FOR TABLE</literal> or
> + <literal>FOR SCHEMA</literal> options, then the publication will
be

Modified.

> (3) space at start of literal
> doc/src/sgml/catalogs.sgml
>
> + and <literal> FOR SCHEMA</literal>, so for such publications there
will be a

Modified.

> (4) Should say "variants of this command change ..." ?
>
> + The fourth, fifth and sixth variants change which schemas are part of
the

Modified.

>
> Also, there seems to be an issue with ALTER PUBLICATION ... SET SCHEMA ...
> (PubType is getting set to 'e' instead of 's'
>
> test_pub=# create publication pub1;
> CREATE PUBLICATION
> test_pub=# create table myschema.test(i int);
> CREATE TABLE
> test_pub=# alter publication pub1 set schema myschema;
> ALTER PUBLICATION
> test_pub=# \dRp pub1
> List of publications
> Name | Owner | All tables | Inserts | Updates | Deletes | Truncates |
> Via root | PubType
>
------+-------+------------+---------+---------+---------+-----------+----------+---------
> pub1 | gregn | f | t | t | t | t |
> f | e
> (1 row)
>
> test_pub=# alter publication pub1 add table test;
> ALTER PUBLICATION
> test_pub=# \dRp pub1
> List of publications
> Name | Owner | All tables | Inserts | Updates | Deletes | Truncates |
> Via root | PubType
>
------+-------+------------+---------+---------+---------+-----------+----------+---------
> pub1 | gregn | f | t | t | t | t |
> f | t
> (1 row)
>
>
> When I use "ADD SCHEMA" instead of "SET SCHEMA" on an empty
> publication, it seems OK.

Modified.

Thanks for the comments, these issues are fixed as part of the v12 patch
posted at [1].
[1] -
https://www.postgresql.org/message-id/CALDaNm3V9ny5dJM8nofLGJ3zDuDG0gS2dX%2BAhDph--U5y%2B4VbQ%40mail.gmail.com

Regards,
Vignesh

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-07-16 10:22:39 Re: [PATCH] Use optimized single-datum tuplesort in ExecSort
Previous Message vignesh C 2021-07-16 10:09:40 Re: Added schema level support for publication.