| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
| Subject: | Re: Logical Replication of sequences |
| Date: | 2025-11-11 05:46:18 |
| Message-ID: | CALDaNm3+R4UU4x5K_Q33vo3g7fpF7rdR9mPdty_=iLnNQynnMA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 11 Nov 2025 at 09:59, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> wrote:
>
> On Tue, 11 Nov 2025 at 09:02, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Mon, Nov 10, 2025 at 4:22 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> > >
> > > On Mon, 10 Nov 2025 at 14:34, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)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.
> > >
> >
> > I also agree. BTW, can we change pub_obj_type_list to
> > pub_all_obj_type_list to be more explicit about this variant? If you
> > agree then we can make similar changes
> > (pub_obj_type->pub_all_obj_type) at the following places as well:
> >
> > + * CREATE PUBLICATION FOR ALL pub_obj_type [, ...] [WITH options]
> > + *
> > + * pub_obj_type is one of:
> > + *
> >
> Hi Vignesh, Amit
>
> Thanks for confirming.
> Also, I agree that the name 'pub_all_obj_type' will be more suitable.
> I have updated the patch for the same.
Thanks, this version looks good to me, I don't have any comments.
Regards,
Vignesh
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vaibhav Dalvi | 2025-11-11 05:48:32 | Re: [PATCH] Add pg_get_subscription_ddl() function |
| Previous Message | Tom Lane | 2025-11-11 05:43:01 | Re: Make PQgetResult() not return NULL on out-of-memory error |