Re: Added schema level support for publication.

vignesh C <vignesh21@gmail.com>

From: vignesh C <vignesh21@gmail.com>
To: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
Cc: Rahila Syed <rahilasyed90@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Ajin Cherian <itsajin@gmail.com>
Date: 2021-06-24T18:25:02Z
Lists: pgsql-hackers
On Thu, Jun 24, 2021 at 12:10 PM tanghy.fnst@fujitsu.com
<tanghy.fnst@fujitsu.com> wrote:
>
> Hi
>
> I applied your V7* patch and complied it. The following warnings came out, please take a look.
>
> >pg_publication.c:688:22: warning: ‘tables’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> >   funcctx->user_fctx = (void *) tables;
> >   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
> >describe.c: In function ‘describePublications’:
> >describe.c:6479:35: warning: ‘pubtype’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> >   else if (has_pubtype && pubtype == PUBTYPE_SCHEMA)
>
> For the warning in pg_publication.c, maybe we can replace the following 'else if' with 'else'.
> +               else if (publication->pubtype == PUBTYPE_SCHEMA)
>
> For the warning in describe.c, initialization of 'pubtype' is needed.

Thanks for reporting these warnings, I have fixed this in the v8 patch
attached at [1].
[1] - https://www.postgresql.org/message-id/CALDaNm044P_cds1OxZvFse5rE_qQfhbUg5MdtMgsa7t_bZGJdw%40mail.gmail.com

Regards,
Vignesh



Commits

  1. Include schema/table publications even with exclude options in dump.

  2. Rename some enums to use TABLE instead of REL.

  3. Add tap tests for the schema publications.

  4. Allow publishing the tables of schema.

  5. In pg_dump, use simplehash.h to look up dumpable objects by OID.