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

From vignesh C
Subject Re: Logical Replication of sequences
Date
Msg-id CALDaNm3G5LYNhGGQC8rM-wwnA0nk21j13Jkr4LkHFTSk0rcEQA@mail.gmail.com
Whole thread Raw
In response to Re: Logical Replication of sequences  (Shlok Kyal <shlok.kyal.oss@gmail.com>)
Responses Re: Logical Replication of sequences
List pgsql-hackers
On Mon, 10 Nov 2025 at 14:34, Shlok Kyal <shlok.kyal.oss@gmail.com> wrote:
>
> While working on another thread, I found that in HEAD gram.y has
> grammar which was committed as part of this thread:
> ```
>             | CREATE PUBLICATION name FOR pub_obj_type_list opt_definition
>                 {
>                     CreatePublicationStmt *n = makeNode(CreatePublicationStmt);
>
>                     n->pubname = $3;
>                     n->pubobjects = (List *) $5;
>                     preprocess_pub_all_objtype_list($5, &n->for_all_tables,
>                                                     &n->for_all_sequences,
>                                                     yyscanner);
>                     n->options = $6;
>                     $$ = (Node *) n;
>                 }
> ```
>
> Here we are assigning "n->pubobjects = (List *) $5". But later in the
> code this is not used anywhere for ALL TABLES/ ALL SEQUENCES
> publication. It is used for other publications (not ALL TABLES/
> SEQUENCES) inside function "ObjectsInPublicationToOids"
>
> So are we required to assign "n->pubobjects" here?
>
> I have created a patch to remove this assignment. It passed "make check-world".

I agree that this is not required for ALL TABLES/ALL SEQUENCES cases.
Your changes look good to me.

Regards,
Vignesh



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Improve pg_sync_replication_slots() to wait for primary to advance
Next
From: "zengman"
Date:
Subject: Minor adjustment: Update the range of the commit_siblings parameter.