Re: Skipping schema changes in publication
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>,
"David G. Johnston" <david.g.johnston@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Shlok Kyal <shlok.kyal.oss@gmail.com>, Peter Smith <smithpb2250@gmail.com>,
"Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, YeXiu <1518981153@qq.com>, Ian Lawrence Barwick <barwick@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-02-18T11:04:07Z
Lists: pgsql-hackers
On Wed, Feb 18, 2026 at 11:41 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Feb 17, 2026 at 5:08 PM shveta malik <shveta.malik@gmail.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?
--
With Regards,
Amit Kapila.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix miscellaneous issues in EXCEPT publication clause.
- 6b0550c45d13 19 (unreleased) landed
-
Change syntax of EXCEPT TABLE clause in publication commands.
- 5984ea868eee 19 (unreleased) landed
-
Add support for EXCEPT TABLE in ALTER PUBLICATION.
- 493f8c6439cf 19 (unreleased) landed
-
Allow table exclusions in publications via EXCEPT TABLE.
- fd366065e06a 19 (unreleased) landed
-
Add wait_for_subscription_sync for TAP tests.
- 0c20dd33db16 16.0 cited