Re: Added schema level support for publication.

From: vignesh C <vignesh21(at)gmail(dot)com>
To: "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>
Cc: Rahila Syed <rahilasyed90(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Added schema level support for publication.
Date: 2021-06-05 13:32:28
Message-ID: CALDaNm0XNruf1Xncah5Qk2S4tvbvvxZOBan2+gygb=m3ZcJvLw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 25, 2021 at 2:47 PM tanghy(dot)fnst(at)fujitsu(dot)com
<tanghy(dot)fnst(at)fujitsu(dot)com> wrote:
>
> On Monday, May 24, 2021 at 8:31 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > The earlier patch does not apply on the head. The v4 patch attached
> > has the following changes:
> > a) Rebased it on head. b) Removed pubschemas, pubtables columns and
> > replaced it with pubtype in pg_publication table. c) List the schemas
> > in describe publication. d) List the publication in list schemas. e)
> > Add support for "FOR SCHEMA CURRENT_SCHEMA". f) Tab completion for
> > "FOR SCHEMA" in create publication and alter publication. g) Included
> > the newly added structure type to typedefs.lst
>
> Thanks for your patch.
>
> I ran "make check-world" after applying your patch but it failed on my machine. I saw the following log:
> --------------
> parallel group (2 tests): subscription publication
> publication ... FAILED 108 ms
> subscription ... ok 87 ms
>
>
> diff -U3 /home/fnst/data/postgresql_schema/postgresql/src/test/regress/expected/publication.out /home/fnst/data/postgresql_schema/postgresql/src/test/regress/results/publication.out
> --- /home/fnst/data/postgresql_schema/postgresql/src/test/regress/expected/publication.out 2021-05-25 15:44:52.261683712 +0800
> +++ /home/fnst/data/postgresql_schema/postgresql/src/test/regress/results/publication.out 2021-05-25 15:48:41.393672595 +0800
> @@ -359,10 +359,10 @@
> "public"
>
> \dn public;
> - List of schemas
> - Name | Owner
> ---------+---------
> - public | vignesh
> +List of schemas
> + Name | Owner
> +--------+-------
> + public | fnst
> Publications:
> "testpub3_forschema"
> --------------
>
> I think the owner of CURRENT_SCHEMA should not be written into publication.out because the result is related to the user.
> Maybe we can use "ALTER SCHEMA public OWNER TO owner" to change its default owner before this test case. Thoughts?

Thanks for identifying and reporting this issue. I have \dn with the
equivalent query to display only the publication name. The updated
patch has the fix for the same.

Regards,
Vignesh

Attachment Content-Type Size
v5-0001-Added-schema-level-support-for-publication.patch text/x-patch 89.1 KB
v5-0002-Tests-and-documentation-for-schema-level-support-.patch text/x-patch 46.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-06-05 14:16:20 Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Previous Message David Christensen 2021-06-05 12:25:39 Re: DELETE CASCADE