Re: Include sequences in publications created by pg_createsubscriber

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Include sequences in publications created by pg_createsubscriber
Date: 2026-06-30 06:47:26
Message-ID: CALDaNm0G=RXa+mXwrqSLYATdT4NvhZ+bv6yrH8pB+xWzBDTSxQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 29 Jun 2026 at 20:07, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> wrote:
>
> >
> > Thanks for the comments, here is an updated version with the fixes for the same.
> >
> Hi Vignesh,
>
> I reviewed the patch, here are some comments:
>
> 1. In pg_createsubscriber.sgml:
> + replica from a physical standby server. By default,
> + <application>pg_createsubscriber</application> configures
> + <link linkend="logical-replication">logical replication</link> by
> + automatically creating internal publication and subscription objects. In
> + this default mode, a pair of publication and subscription objects are
> + created for each database, and all tables and sequences in the specified
> + databases. By default, a pair of publication and subscription objects are
> + created for each database. It must be run at the target server.
>
> 1a. Line "a pair of publication and subscription objects are created
> for each database"
> is repeated twice.
>
> 1b. This line looks like something is missed:
> ```
> In this default mode, a pair of publication and subscription objects are
> created for each database, and all tables and sequences in the specified
> ```
> maybe we can rewrite it as:
> ```
> In this default mode, a pair of publication and subscription objects are created
> for each database, publishing all tables and sequences in the
> specified database.
> ```
>
> 2. '--publication' should be inside <option></option> tag.
> + the source server. If the --publication option is not specified,
> + <application>pg_createsubscriber</application> creates a publication
> + using <link linkend="sql-createpublication-params-for-all-tables">
>
> 3. For consistency, perhaps use "user-specified publications" here, as the later
> documentation already refers to them using the same term.
> + For user-nominated publications, sequences are only replicated if they were
>
> 4. In 040_pg_createsubscriber.pl:
> +is( $result, qq(t|t),
> + "publication is created with both all-tables and all-sequences enabled"
> +);
> extra space before $result. I think we should run pg_perltidy on the test file.

Thanks for the comments, Shlok. The attached v5 version patch has the
changes for the reported comments.

Regards,
Vignesh

Attachment Content-Type Size
v5-0001-Include-sequences-in-publications-created-by-pg_c.patch application/octet-stream 8.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2026-06-30 07:01:06 Re: Report bytes and transactions actually sent downtream
Previous Message Shlok Kyal 2026-06-30 06:43:39 Re: Support EXCEPT for ALL SEQUENCES publications