Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLf4h-006NGo-2A for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Nov 2025 10:06:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vLf4g-00C1J7-16 for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Nov 2025 10:06:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vLf3u-00ByGU-34 for pgsql-hackers@lists.postgresql.org; Wed, 19 Nov 2025 10:05:19 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vLf3s-000JlN-2U for pgsql-hackers@lists.postgresql.org; Wed, 19 Nov 2025 10:05:18 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-65763315216so813785eaf.0 for ; Wed, 19 Nov 2025 02:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763546717; x=1764151517; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ksJMgrSR5jimHeifAkR7UE0/75YyqmGUULn11cyRxfY=; b=auii0FsaTb7E+mgSR8I8lf6C10Ov6gNhFxQ3T5ReLgbFphCE2G3WF//1WnMIeSlfgt CWNs8Fab9QvtGToTkgueF6SZqAM0B9JS/TNBob9u6uwf9qoiRzAjbwWK7T2PT+FIUhBg rHJsoGTwQCO3xVsFY0v+N27zxUchssGXG8L8C5mHiWJkycchThDdIA7Vn1HiUmRC+S0G keQs4Rui57/uG/iS8vQcsUQDmexlzPsPF9gMAc0Me2lErwa176NsemuqwAGJJEeiIU87 ap/IOev6L6Tm09n3LW5ID2i21HNKOqjAw0Bv4OmNobL1PtSoJbMapUtUH3WcpiqVoPju NNtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763546717; x=1764151517; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ksJMgrSR5jimHeifAkR7UE0/75YyqmGUULn11cyRxfY=; b=FRupzl2QEH4R4Jgg1bLJkVhTsJdWqoQqnXoAwBIeObYNNwO37/qp6C3l+iq+Qhy6gi y6+zXECRJ4DqvG73x0bkOB7Z8rDxe56qPE1w9tO6m+FUD8PMAPdV0AS8u6GtIn4zemaR MCGgFypJrxxOAbtW6Q8NGdPJhpXkEDu7HLFacwzfj2cHWmR5DyTya9qZdfCD4yxzD19K 8gZkF5L76wCGtQH9QbatzAPzlVRroo3prp+nYIj+IXCj/4Wj5oY71GpyJvuBcXOwfhSe cSSFHOFKdp5JkjUP4wE1kL9qxpnM7335E07utUvUnoNJ3g2tVfVycaoeFFWIQAjCv6oJ SA3g== X-Forwarded-Encrypted: i=1; AJvYcCVOKdVsDCOqFXDbxjlDugOtzb1iSZfBYVTl60UwgeeN2qW9nettwAvfBzelFa/MvOylkzY47aZa2sIYpInz@lists.postgresql.org X-Gm-Message-State: AOJu0YwsJevI/HcW40C8JV8fui2pp0E/5odfgAeE9wHPjrfJJPCqPBtC XjGAwP4jGAGv3og+jpi8LbyI9Ct0w43tmMH6o8kfRl9YJY/fpc4Ga93iIYKir1hkEKbIQ/UKtfV LyKi5oeFxJM9uf+7sgHm9nGBfdsfhWNg= X-Gm-Gg: ASbGnctxbK73tYHr4AxyWEnDEOdzeTkkIVXeFcGLOJZrjcShAtnx6zQK9yz34/5MKmb Q80Nkj/fCMfq1uQoEgBtfu0W4dsx79+NTPtWfTBM+krdaQEsVDXKkAU3/2oDX+8MJEtX5xEdYy/ BfTRENRtZyrF2VElwTrBwcQXRlPLQb9V6oidYyrzSApYoGGf7BZ4D2z7El3AlCBwQftFHa9UR6/ 0TT4C1F7WBsNvX1DMKt5fCyEik5E5zSGYPvNN2ri9QShmpEDZUJ1DOFzUMBSYxXfWniU9leBCcR wwHdPhZ5 X-Google-Smtp-Source: AGHT+IGh4yyHln1Io07/jqwG9mKc7Z74Q6RIMPSnSWUiOgc1kih9Uw854cXAAW18VUrR2NvyrQ8w6lM0wqtEnyLjY3A= X-Received: by 2002:a05:6870:d183:b0:3e8:9537:f84c with SMTP id 586e51a60fabf-3e89538329cmr7487166fac.46.1763546716820; Wed, 19 Nov 2025 02:05:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Shlok Kyal Date: Wed, 19 Nov 2025 15:35:05 +0530 X-Gm-Features: AWmQ_blBZq1SCS3y4PZbGOlczPmuYq6H-r-WF1LblpO52YyGCSIkEG22K1VumC0 Message-ID: Subject: Re: Skipping schema changes in publication To: Peter Smith Cc: vignesh C , Amit Kapila , "Zhijie Hou (Fujitsu)" , YeXiu <1518981153@qq.com>, Ian Lawrence Barwick , Bharath Rupireddy , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 17 Nov 2025 at 11:35, Peter Smith wrote: > > On Tue, Nov 11, 2025 at 9:22=E2=80=AFPM Shlok Kyal wrote: > > > > On Fri, 7 Nov 2025 at 09:34, Peter Smith wrote: > > > > > > Hi Shlok. > > > > > > This is a general comment about the content of these patches. > > > > > > IIUC, the v25* patches currently are currently arranged like this: > > > > > > 0001 > > > - New command ALTER PUBLICATION pubname RESET; > > > 0002 > > > - Add new command: ALTER PUBLICATION pub_name ADD ALL TABLES; > > > - Enhance existing CREATE and the new ALTER syntax for EXCEPT tables > > > 0003 > > > - Enhance existing CREATE and ALTER syntax for EXCEPT col_list > > > > > > ~~~ > > > > > > IMO it is a bug that the ALTER PUBLICATION pub_name ADD/SET ALL TABLE= S > > > command does not already exist as a supported command. And, that is > > > independent of anything else you are implementing here like RESET or > > > EXCEPT. > > > > > > Therefore, I think that one should be 1st in your patchset; The EXCEP= T > > > stuff then just becomes enhancements to existing syntax, which would > > > give a cleaner separation of logic. > > > > > > So, I am suggesting there should be 4 patches instead of 3. e.g. > > > > > > SUGGESTION > > > 0001 - New command: ALTER PUBLICATION pub_name ADD/SET ALL TABLES; > > > 0002 - New command: ALTER PUBLICATION pubname RESET; > > > 0003 - Enhance existing CREATE/ALTER syntax for EXCEPT tables > > > 0004 - Enhance existing CREATE/ALTER syntax for EXCEPT col_list > > > > > I read the previous conversation in the thread. And got an > > understanding that RESET was introduced so that we can have a way to > > remove 'EXCEPT TABLE' from a publication and after RESET we can use > > 'ADD ALL TABLES [EXCEPT]' to alter the list of EXCEPT TABLE. So I > > prefer to keep 'ALTER PUBLICATION .. RESET' as the first patch. > > I think since 'ADD ALL TABLES' serves our current purpose. We can add > > the syntax 'SET ALL TABLES' once 'ADD ALL TABLES' is in committed or > > in committable shape. > > > > Sure, you can defer the ALTER PUBLICATION ... SET ALL TABLES. > > However, I still think that 'ALTER PUBLICATION ... ADD ALL TABLES' is > a self-contained new command that deserves to have its own *separate* > patch and tests and docs, etc. > > IMO, patch 0002 is doing too much at once. It would be tidier (and > smaller and easier to review, etc) if you split 0002 to implement the > new 'ALTER PUBLICATION ... ADD ALL TABLES' separately, before > expanding on that to implement the EXCEPT part: 'ALTER PUBLICATION ... > ADD ALL TABLES [EXCEPT ...]'. I agree with you. I have split the 0002 patch. Now we have following patches 0001 - Add RESET clause to Alter Publication 0002 - Support ADD ALL TABLES in ALTER PUBLICATION 0003 - Skip publishing the tables specified in EXCEPT TABLE 0004 - Skip publishing the columns specified in FOR TABLE EXCEPT I have attached the updated patch in [1]. [1]: https://www.postgresql.org/message-id/CANhcyEXCKPCAdoqBLAhxt64Nwf%2B7T= 52dd8daE3qvhBNTvro13Q%40mail.gmail.com Thanks, Shlok Kyal