Re: Skipping schema changes in publication

Peter Smith <smithpb2250@gmail.com>

From: Peter Smith <smithpb2250@gmail.com>
To: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@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: 2025-11-24T21:41:05Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix miscellaneous issues in EXCEPT publication clause.

  2. Change syntax of EXCEPT TABLE clause in publication commands.

  3. Add support for EXCEPT TABLE in ALTER PUBLICATION.

  4. Allow table exclusions in publications via EXCEPT TABLE.

  5. Add wait_for_subscription_sync for TAP tests.

Hi Shlok.

I checked the latest v28-0004 "EXCEPT (col-list)" patch. I have no
code review comments, but I do have one syntax question.

======

The result of the current patch proposed syntax is like:

CREATE PUBLICATION pubname FOR TABLE tabname EXCEPT (col1, col2, col3)
ALTER PUBLICATION pubname ADD TABLE tabname EXCEPT (col1, col2, col3)

~~

In the previous patch v28-0003 (FOR ALL TABLES EXCEPT [TABLE]), I
thought the optional noise-word TABLE did not have any user benefit
because TABLE was already obvious.

OTOH, here in patch v28-0004, it might be helpful to have an
*optional* [COLUMN] part. e.g., I felt  "EXCEPT [COLUMN]" would
improve the readability of these commands.

Compare:
CREATE PUBLICATION pubname FOR TABLE tabname EXCEPT (col1, col2, col3)
CREATE PUBLICATION pubname FOR TABLE tabname EXCEPT COLUMN (col1, col2, col3)

Compare:
ALTER PUBLICATION pubname ADD TABLE tabname EXCEPT (col1, col2, col3)
ALTER PUBLICATION pubname ADD TABLE tabname EXCEPT COLUMN (col1, col2, col3)


This is similar to the optional "[COLUMN]" keyword used here [1].

Thoughts?

======
[1] https://www.postgresql.org/docs/devel/sql-altertable.html

Kind Regards,
Peter Smith.
Fujitsu Australia