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-21 17:34:42
Message-ID: CALDaNm1sv3wOhRh426hVfVQLbaPPb+=T=5QyQRFutajqxTUfZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 19, 2021 at 2:41 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
>
> On Fri, Jul 16, 2021 at 8:13 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > 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
> >
>
> There seems to be a problem with ALTER PUBLICATION ... SET TABLE ...
> After that command, it still regards it as an empty (e) publication,
> so I can then ALTER PUBLICATION ... ADD SCHEMA ...
>
> e.g.
>
> test_pub=# create schema myschema;
> CREATE SCHEMA
> test_pub=# CREATE TABLE myschema.test (key int, value text, data jsonb);
> CREATE TABLE
> test_pub=# create publication pub1;
> CREATE PUBLICATION
> test_pub=# \dRp+ pub1
> Publication pub1
> Owner | All tables | Inserts | Updates | Deletes | Truncates | Via
> root | Pubtype
> -------+------------+---------+---------+---------+-----------+----------+---------
> gregn | f | t | t | t | t | f | e
> (1 row)
>
> test_pub=# alter publication pub1 set table myschema.test;
> ALTER PUBLICATION
> test_pub=# \dRp+ pub1
> Publication pub1
> Owner | All tables | Inserts | Updates | Deletes | Truncates | Via
> root | Pubtype
> -------+------------+---------+---------+---------+-----------+----------+---------
> gregn | f | t | t | t | t | f | e
> (1 row)
>
> test_pub=# alter publication pub1 add schema myschema;
> ALTER PUBLICATION
> test_pub=# \dRp+ pub1
> Publication pub1
> Owner | All tables | Inserts | Updates | Deletes | Truncates | Via
> root | Pubtype
> -------+------------+---------+---------+---------+-----------+----------+---------
> gregn | f | t | t | t | t | f | s
> Schemas:
> "myschema"

Thanks for reporting this issue, this issue is fixed in the v13 patch
posted at [1]
[1] - https://www.postgresql.org/message-id/CALDaNm0%3DMaXyAok5iq_-DeWUd81vpdF47-MZbbrsd%2BzB2P6WwA%40mail.gmail.com

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2021-07-21 17:37:32 Re: Added schema level support for publication.
Previous Message vignesh C 2021-07-21 17:34:00 Re: Added schema level support for publication.