Re: Skipping schema changes in publication

From: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: shveta malik <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, YeXiu <1518981153(at)qq(dot)com>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Skipping schema changes in publication
Date: 2026-02-19 04:45:06
Message-ID: CANhcyEXJ_wTbpb74CCeXbXnPtM=yimUC1MXpD8PCJ6mBr1QzHw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 18 Feb 2026 at 16:34, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Feb 18, 2026 at 11:41 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >
> > On Tue, Feb 17, 2026 at 5:08 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> > >
> >
> > > 7)
> > > Currently the error i s:
> > >
> > > postgres=# create subscription sub1 connection '...' publication pub1,pub2,pub3;
> > > ERROR: publications "pub1", "pub2", "pub3" are defined with EXCEPT TABLE
> > > HINT: Subscription cannot be created using multiple publications that
> > > specify EXCEPT TABLE.
> > >
> > > Hint looks more like DETAIL. Shall we have this:
> > >
> > > ERROR: cannot create subscription with multiple publications that
> > > specify EXCEPT TABLE
> > > DETAIL: The publications "pub1", "pub2", and "pub3" define EXCEPT
> > > TABLE clauses.
> > >
> >
> > So, you are talking about below error:
> > + ereport(ERROR,
> > + errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
> > + errmsg("publications %s are defined with EXCEPT TABLE", pubnames.data),
> > + errhint("Subscription cannot be created using multiple publications
> > that specify EXCEPT TABLE."));
> >
> > Apart from the message, the error code here should be
> > ERRCODE_FEATURE_NOT_SUPPORTED. How about an errmsg like: "cannot
> > combine publications %s with EXCEPT TABLE clauses",
> > except_publications? If we choose a message like that then we don't
> > need a hint. I suggest you can refer to the following column list
> > message to form a message for the except clause.
> >
> > ereport(ERROR,
> > errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> > errmsg("cannot use different column lists for table \"%s.%s\" in
> > different publications",
> > nspname, relname));
> >
>
> Based on the above, the following message should also be changed:
> + ereport(ERROR,
> + errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> + errmsg("cannot use multiple publications with EXCEPT TABLE lists"),
> + errdetail("The following publications have exceptions: %s.",
> + pub_names_str.data));
>
> Few more minor comments:
> 1.
> + elog(LOG, "fetch_relation_list: executing query to fetch
> effectiverelations: \n%s",
> + cmd.data);
>
> space is required between effective and relations.
>
> 2.
> @@ -10858,6 +10862,7 @@ PublicationObjSpec:
> $$->pubtable->relation = $2;
> $$->pubtable->columns = $3;
> $$->pubtable->whereClause = $4;
> + $$->location = @1;
> what is purpose of this change in PublicationObjSpec?
>
> 3.
> + elog(LOG, "Executing query to get the tables:\n%s", cmd.data);
>
> This can be more specific. How about "Executing query to get the
> partition tables to be copied" or something like that?
>
Hi Amit,

Thanks for reviewing the patch. I have addressed the above comments
and the minor comments in [1] in v46 patch.
I have shared v46 patch in [2].

[1]: https://www.postgresql.org/message-id/CAA4eK1KWqttt3UMdR8P0wYyqDO6cuLhuvGb5cDpuctG8F10EFA%40mail.gmail.com
[2]: https://www.postgresql.org/message-id/CANhcyEXBw0NeCmrbzSEQ3bBHzzEwvyLo-rOx0migTtfm-H4sNw%40mail.gmail.com

Thanks,
Shlok Kyal

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2026-02-19 04:45:24 Re: Skipping schema changes in publication
Previous Message Shlok Kyal 2026-02-19 04:43:30 Re: Skipping schema changes in publication