On Sat, 7 Mar 2026 at 06:41, Amit Kapila <[email protected]> wrote: > > On Fri, Mar 6, 2026 at 6:25 PM Andrei Lepikhov <[email protected]> wrote: > > > > On 6/3/26 11:56, Amit Kapila wrote: > > > > > > Option-1: ALTER PUBLICATION pub1 SET ALL TABLES; This suggests it is > > > still an ALL TABLES publication, but providing a new definition. Since > > > it didn't include an EXCEPT clause this time, the exception list is > > > now empty. > > > > I vote for a style that allows incremental add/remove table. > > > > > If we follow the first one, then we can choose "ALTER PUBLICATION pub1 > > > SET ALL TABLES EXCEPT TABLE (t1)" to set a new except list instead of > > > "ALTER PUBLICATION pub1 SET EXCEPT TABLE (t1)" > > This approach works best for me. It also matches the internal > > replication logic: take the new publication state, compare it with the > > old one, and process the differences. > > > > So, to summarize based on your and Dilip's inputs, the following > syntax will be preferable to set/reset EXCEPT list: (a) To set a > except table list to a different list than what is defined originally, > we will use: "ALTER PUBLICATION pub1 SET ALL TABLES EXCEPT TABLE (t1, > ..)" (b) To reset the entire except list, we will use "ALTER > PUBLICATION pub1 SET ALL TABLES".
The attached v59 patch has the changes to update the syntax accordingly. Regards, Vignesh
v59-0001-Support-SET-ALL-TABLES-EXCEPT-TABLE-in-ALTER-PUB.patch
Description: Binary data
