Re: Logical Replication of sequences - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Logical Replication of sequences
Date
Msg-id CAA4eK1LDWDZMu_o=o22VdWJOuFhNTSoD-aFoceHRXvEiJmP1OA@mail.gmail.com
Whole thread Raw
In response to Re: Logical Replication of sequences  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On Tue, Oct 7, 2025 at 4:52 PM vignesh C <vignesh21@gmail.com> wrote:
>
> Thanks for the comments, the attached patch has the changes for the same.
>

 parse_publication_options(ParseState *pstate,
    List *options,
+   bool allsequences,
+   bool alltables,
    bool *publish_given,
    PublicationActions *pubactions,
    bool *publish_via_partition_root_given,
    bool *publish_via_partition_root,
    bool *publish_generated_columns_given,
-   char *publish_generated_columns)
+   char *publish_generated_columns,
+   bool def_pub_action)
{
…
+
+ if (allsequences &&
+ (*publish_given || *publish_via_partition_root_given ||
+ *publish_generated_columns_given))
+ {
+ if (!alltables)
+ ereport(ERROR,
+ errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("publication parameters are not applicable for publications
defined as FOR ALL SEQUENCES"));

I think we can let users specify publication parameters even for
sequence_only publication as well. Because users could then later add
tables to it by Alter Publication .. Add .. The notice should be
sufficient and also then it would bebetter to give it outside this
function as that could be extended in future when we would allow a mix
of sequence and table publications.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: psql: Count all table footer lines in pager setup
Next
From: Dilip Kumar
Date:
Subject: Re: Logical Replication of sequences