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 1w17I0-0000RV-28 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 18:31:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1793-005nqj-2g for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 18:21:58 +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 1w1793-005nqD-1X for pgsql-hackers@lists.postgresql.org; Fri, 13 Mar 2026 18:21:58 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w1792-00000001zbv-0i6j for pgsql-hackers@lists.postgresql.org; Fri, 13 Mar 2026 18:21:57 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-59e4989dacdso2886662e87.1 for ; Fri, 13 Mar 2026 11:21:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773426113; cv=none; d=google.com; s=arc-20240605; b=XvdwPiXWfFJCVBr8HGbH84ZNyu7KneSc/4eW9ziGWdouVg+DYjZNWM7hqtPaVxIImb +7WBoDi0dFX0jFZNUi+46wIFuCRkpp8YgpRRJMy7qK+sYqNOdo13LfuW2KNCKJgFtatx K371sOXJpfG7XqZ+wjhdZ29M/zHuOilVQeS0OJUpFYKx1c7PLykEFTxw7f+5GHOZpXyC Cq7s3otghIcsEksV84QbTfrWo6jAw4MJb7eUxXvrhhcVPy1JFXqDU5KHCD8uaR4eF1HS 1xI1SjuLc4MrUcFAe9Ze75xfmsX0hDj6FYMiYlaEqS9FUEeKZjtPEHuXm8l4V0G7t9eU inEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=r6bPiu/dLmJR23Xt9jsKqoJ0xt9+jB2qGH16yhKGCFo=; fh=xLfX4VeevUbBW6xuAgVVuhChDAGwdBaWrRzuMSJDE8E=; b=ltlNmTG+kqBT02Q0rve83YSZXIPmpW+YiNifpvWOozA3NbNhktC9tsPnLKanzQ/bbc bicBMHU8oJPCsHVhGrx2Mwm9W72/M7jJDtjzIR6FzwDWngZSgFtF5GUVGrS9tPd303wk wYyUOn/F5oEvIbZnuowd2QQzOkdA3aLwSuKCskxY6PShrFp2YyaLStU6F0QT2XplEY33 yq0M7j6xeFTfuFXtejcZTylBUm+KJSmlAdGtD6BMk0vMHFlFY7gfymxsuEJ6xXYSFw7R aVIysYCImvagk5jQktdItFDipc0+E01z2qhn8JKcaEU1QEnaLd1Z5PNTRVlF7VIDukmu Fsbg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773426113; x=1774030913; 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=r6bPiu/dLmJR23Xt9jsKqoJ0xt9+jB2qGH16yhKGCFo=; b=jeyRDbkbR1EOEyxNZztnTADLwkwqvZhQ6vzVU6cPEUbJ3pYtO1DsbJjZc9PbSbg1di +QnjtM5aYJbe1R7hwRuoQHi4hbFCm4hZdm+TlHWemrxrboYOsN64vlQvRjZV843WBMOW tItfZfGHT12sCsoaBzPLKEkEO2riz9IEc2CrS+h6SKC9HYxlF7ujLAZWg2MIl3dNUamH 8pwGDPoEvixEUYNL0toOoTgG4oPXMw4el82p6D2pf45BxZOMYdUcHD2RZur6x1ktm3Ds mP6S2WxP8GbmzfEb05Zh8ELA9UfI+mo3KBQsdl/FBckBAN3Q0GJ2SIEX3ur7XkeR8kZR V+Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773426113; x=1774030913; 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=r6bPiu/dLmJR23Xt9jsKqoJ0xt9+jB2qGH16yhKGCFo=; b=J8IOdDibOHzWjWxIF97xsHA53RuzIFY0vvEv+Ha7Pq7Xw2G9isLO8qxt8gFcQRioCN MmkC0E9zJ2+C9RHfIW6KahSgmnAfXJzvl3LB/FARvHyF7Vje1cRF4m+5sEZLADzVMM3K 9wBfaLIu2v+R47G+brr9IX09VDAv+HSfXe97t6xC41ndUjRFYdkipfyOYG850/zVRi8t zaV0IrviWGh86FeQvRQctQ6PapGDmzJpo6xGITnpldYBe2iwyqVaWVm8GXlI8fNuw7jp f9d9KBosETxX2RO0mNLYvB10NWWANJsD/GZ+TH81jjkfDngo6txtKlrsrZKOlExdz2hH RjHw== X-Forwarded-Encrypted: i=1; AJvYcCXdBQLPtdntwyaP+hZPX5ibHKmJMG4Q+JlfefuU8jAAMH0L/3dKoy/tsuZ8iqdgLpEhlxMq2RrZTrkDOJn1@lists.postgresql.org X-Gm-Message-State: AOJu0YzMVKQbgtqiHDXZMTfyoHYObJWqgdQ+3RWKdV7A4WegZAXggYDZ qVUVOjq+5C98T9oNEQk2qJPFVuaHbovECc352G6wEXxuYD+umI//SIgwNqjDrkRhchW+xosIso/ 2WX7J8HePGHCdo1/ZQS3kRj8u62f4chg= X-Gm-Gg: ATEYQzxodSTbEva4DwzkHF5Rm30CfbghUZH2NPl1viFR2UAv+tmq/ag4M1e8iqxdTQx RsJm5REMty3PkY+7p9aiAw1rohSvP/Yepv38MNgFb9e1twXkWwpHkDm1KQTl1hsm2KMD+tFKHze SqySiRro2k0CAKJh6we2bln8XwvvnCDVCygH2xnwY1uE0dBFb88fJbKQxlY0gmqLEY4GmiFiEyH +R5xvaSE5oakZgWsxWH4vbUnL8Ppd/OCpDfGo3ZEQinXSXtNphhblKc+MYt+/bE4lx51pQpiS4A Uud4KsIl X-Received: by 2002:ac2:41c5:0:b0:5a1:2cdc:446f with SMTP id 2adb3069b0e04-5a162b150e1mr1025823e87.33.1773426113059; Fri, 13 Mar 2026 11:21:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiko Sawada Date: Fri, 13 Mar 2026 11:21:16 -0700 X-Gm-Features: AaiRm53d2wPBvRxGS-DnKxjjVOhHuHJx1-91XDESARoy-fNf0MT679iJe2IsyIA Message-ID: Subject: Re: Skipping schema changes in publication To: Amit Kapila Cc: Peter Smith , "Hayato Kuroda (Fujitsu)" , shveta malik , vignesh C , Shlok Kyal , Nisha Moond , Ashutosh Sharma , "David G. Johnston" , Dilip Kumar , "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 Fri, Mar 13, 2026 at 2:51=E2=80=AFAM Amit Kapila wrote: > > On Fri, Mar 13, 2026 at 8:55=E2=80=AFAM Peter Smith wrote: > > > > Hou-San (off-list) gave an interesting example of how it might look > > when the example is combined with the hypothetical future ability to > > exclude all schema tables from a "FOR ALL TABLES" > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE t1, t2, TABLES IN > > SCHEMA s1); > > > > So, if we follow this, in future, the syntax would look like: > Create publication pub1 FOR ALL TABLES EXCEPT (TABLE t1, t2, TABLES IN > SCHEMA s1, s2), ALL SEQUENCES EXCEPT (SEQUENCE s1); > > I think if we use the above syntax then one can also argue that why > not use FOR ALL (TABLES, SEQUENCES) instead of ALL TABLES, ALL > SEQUENCES. The same is true for the syntaxes of TABLE(t1, t2) and SCHEMA(s1, s2), no? If we allow grouping the tables and the schemas by TABLE and SCHEMA keywords respectively in exclusion lists, one could argue why we don't allow it for the inclusion list. > > Instead the current command would like: > Create publication pub1 FOR ALL TABLES EXCEPT TABLE (t1, t2), EXCEPT > TABLES IN SCHEMA (s1, s2), ALL SEQUENCES EXCEPT SEQUENCE (seq1, seq2); > > Though it is slightly lengthy it makes the syntax local such that the > meaning of a clause is determined by what is inside it, not by > something that appears ten words later. While it helps the syntax locality, I'm concerned that it could make the context of the EXCEPT clause ambiguous. For example, IIUC the above syntax rule would allow us to write: CREATE PUBLICATION pub1 FOR ALL TABLES EXCEPT TABLES IN SCHEMA (s1), EXCEPT TABLE (t1); Regarding the second EXCEPT clause, while one might think it excludes t1 from ALL TABLES, one might think it excludes t1 from the first EXCLUDE clause (i.e., the publication actually includes t1 in the publication). Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com