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-14T06:44:43Z
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.

Some review comments for patch v27-0001.

======
doc/src/sgml/ref/alter_publication.sgml

1.
+  <para>
+   The <literal>RESET</literal> clause will reset the publication to
the default
+   state. This includes resetting all publication parameters, setting the
+   <literal>ALL TABLES</literal> and <literal>ALL SEQUENCES</literal> flags to
+   <literal>false</literal>, and removing all associated tables and
schemas from
+   the publication.
   </para>

It would be better to give references to the actual
pg_publication.puballtables and .puballsequences flag fields [1]
instead of vaguely calling them the "<literal>ALL TABLES</literal> and
<literal>ALL SEQUENCES</literal> flags".

======
src/backend/commands/publicationcmds.c

AlterPublicationReset:

2.
+ if (pubform->puballtables)
+ CacheInvalidateRelcacheAll();

Does that also need to check ->puballsequences?

======
src/test/regress/sql/publication.sql

3.
If you want to, you can easily combine many of these test cases and
verify them in one go instead of separate ALTER/RESET for every kind
of flag.

~~~

4.
+-- Verify that 'ALL TABLES' flag is reset

Missing test to check the 'ALL SEQUENCES' flag gets reset?

======
[1] https://www.postgresql.org/docs/devel/catalog-pg-publication.html

Kind Regards,
Peter Smith.
Fujitsu Australia.