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 1w5dw4-003TSx-25 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 06:11:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5dw3-001Gyp-0H for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 06:11:15 +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 1w5dw2-001Gyh-2B for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 06:11:15 +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 1w5dw1-000000015wZ-0m94 for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 06:11:14 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5a27bfadca9so954506e87.3 for ; Wed, 25 Mar 2026 23:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774505471; cv=none; d=google.com; s=arc-20240605; b=hrSSLn4vOVulXSHXxoZR1DP/w8eESE6TOvOWYjmsMAsQAPWiVMWj6fFC0hAHlbO9Uk hH6gKpxEBk3ZQK+uIGRFaO8OGbdibF5P0KmfJoIygxwTNX+mqpN18mdCqaJNhMEBDEtA jPIVXU/UT5PMIJ1kr3aVX7R/LMuuX7TN7MLn/z869Vi6BTAgRaBx4TEfn/u8go/XH740 6fksvDzPHZBeAaNpEoJaI23scZnIM5akjQJgipo6jzxP5EiyN5q6G+SDOhmTOVPF+qJ4 a2EV60f5OZzRTkOu0rZx1DcHpJISWcrO1QWgSWpTiX/0LolGF0U+uiMsT2Dah3uNENFi 5O1w== 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=5R3JW8OjgSjlnZZ/IIMKJplHwofls8/L4tlhKUC5DJc=; fh=MfJgpwxKQ1vPhhJrF6rHV51J3G4fkuTxZvznrNEsW1I=; b=YoxvjirmZ08cDwfpCl3pdI1hx4lHKddKhQK/xbitluerYclh2iJMiw7IQRWeevwXId iqx69C9nrhkGGMGGfMyTbEDEosU5MnztP1OtumLVFe3rDWdNc1s/0+cZ4JUid51HunR8 Y+JKfYrN8F/Owat1tJdrGd8g2HETZtQcAYusIu8CQCV3OQCyGoKnhM3QjfFk0+QgbKzV SofE0eiCwIl8c4Xu3nZUSs230GaStE4hKBOcgP06uz1bSMBh9i6IIVIV9ixyN4T5VObt 5aOz7BJLDA16aJ/xDDYgDv5bYw5kjEO4ELGBI7BEDDAUMowWwBcCPGYoPo3s/9xPtbjO sqyg==; 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=20251104; t=1774505471; x=1775110271; 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=5R3JW8OjgSjlnZZ/IIMKJplHwofls8/L4tlhKUC5DJc=; b=Wgk7tZVsdrU4v5BB9Ys3wT00rjJ+1G1GBaDJRKImgSTqpi0yFdsLeDdMVaWQj97Df0 inSRhmgNyAid0j4mwa6xZCoHPzN4N4JIcuC+i6g7V8xeWHEdBwjuMsZie8d95AGS9Qed tsX3lArryxWRpNxAPcq3UK1GIlb8faTNshRG87rxKWECs3f7caHkcvTotHU3qcEZKzeI cmlOkXZKErk+g3BY/ryPuPQdfSUqdWRQ4Ss9r3bbunHyX4Z+1zf8xX6q7J0b+YSA0NPd wjUjP9HcKCq/xswOYwroT89ZO0rjlwhtN48AIwdgs/7+Kj0scbayhH+PPZIyvognIP+x nntw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774505471; x=1775110271; 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=5R3JW8OjgSjlnZZ/IIMKJplHwofls8/L4tlhKUC5DJc=; b=Af45exfUnp+ygKtxBrZn2JS3v/WqicvNpXgF7AxHixMdVz1Fu+atfyIb64M2Gu9xAy QEUlAuuzDAmG2dmcruH6Lwt5ZI3UQbDw0OhAMDFeyT/INH0vFbm7VHH9rNsIR6WJAGrn br2kxCqLZ5Fd24Jt7bkuiFfmeI1tUMkjE1LCl/juiP4F6oxOaQKEHfEPWqME62cpecfC 3NmP43pnqYQBihHOou2z82RKR1Dt6XmsJKv9Ot7gnE+RVzKty2MVSubqXgLL4uJ8JJ/b TIE8WvL225+E+6rBty6BPyw/XZROCImr6tGhlWM45rHuKTP87KG6s3GQonga8wMrBuBj 94vw== X-Forwarded-Encrypted: i=1; AJvYcCWjVWoJeG1ed7BIZKmvm8Jo3umK4dYy5fqq5FjhQnXN8gXmzu50GmV5cWk5stDPNKrf3nTFosWu9kBgJ2Iy@lists.postgresql.org X-Gm-Message-State: AOJu0YysuDeTG0pKZfXJDcKbBPNg57TLYFg3T04N3+bmNj3TndTdjYpW /YmrO9gHKc7Ij1CiAlrytHyoOlk5RJXJADGF2mom6mS61ZYrM24KVELKRFaQ1ZbgbQGEjxoX2Td qiwyhXFqMOrI1E6awVAvwpoWSABb87aM= X-Gm-Gg: ATEYQzzw8UUSYXwjCoHvrwq9uUzpO2uFR9SA10V7loLCtjoqVwN21+8YIbsC1GStHVB KNsJKyMg8QjqkC+f/nTonvqiu7sT0ndSx8p2KFw/F1qsYsx3lcAOWLmpGEXy8kandetDxZyPCaU /uuI3w3WaOgeWrYn3wnEasN/JFwZpOYSPkod5yXg81sTUp2wxjcgf50EbDW8t/H6YLlyE4ihLDA xjKUVUeJ5XGe/02qxFcDFkGLcGNlopk/6i1OHxSmvMvf/T3WFoG00S64XQCXP9IYlW0gtVCFn0k tf/tiJODq1+5Ms66iDZwkN693GBwKcQsU5VLKYU3/ps6+YSGO/o= X-Received: by 2002:a05:6512:3e0c:b0:5a1:43f3:764a with SMTP id 2adb3069b0e04-5a29b979b0amr2464712e87.5.1774505470345; Wed, 25 Mar 2026 23:11:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Thu, 26 Mar 2026 11:40:58 +0530 X-Gm-Features: AQROBzCd_ZbXTShO4izF1ocQfMxi5fSLXnWfvv8cyfPM101cZkNkV5bGAu0IXRs Message-ID: Subject: Re: Skipping schema changes in publication To: Dilip Kumar Cc: shveta malik , vignesh C , Peter Smith , Masahiko Sawada , "Hayato Kuroda (Fujitsu)" , Shlok Kyal , Nisha Moond , Ashutosh Sharma , "David G. Johnston" , "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 Tue, Mar 24, 2026 at 7:50=E2=80=AFPM Dilip Kumar = wrote: > > On Mon, Mar 23, 2026 at 12:35=E2=80=AFPM shveta malik wrote: > > > > I would like to summarize the discussion/feedback for the EXCEPT > > syntax implemented in [1]. > > > > 1) > > The currently implemented syntax is ([1]): > > > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT TABLE (a, b, c); > > > > There were concerns about why the TABLE keyword and the parentheses > > '()' are required. These have been answered in [2]. > > > > Please review the discussion there. > > > > 2) > > Another feedback on current syntax was to move the TABLE keyword > > inside the parentheses: > > > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE t1, TABLE t2, > > TABLES IN SCHEMA s1); > > CREATE PUBLICATION pub FOR TABLES IN SCHEMA s1 EXCEPT (TABLE t1, TABLE > > t2), TABLE t3; > > > > While this approach is workable, a downside is the repeated use of the > > TABLE keyword inside the parentheses, which can become verbose. But it > > can then be optimized to have: > > > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE t1, t2, t3); > > > > This could be extended further in the future: > > > > CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE t1, t2, TABLES IN > > SCHEMA s1, s2); > > > > This approach gives users flexibility to mix styles, for example: > > > > EXCEPT (TABLE t1, TABLE t2, TABLE t3) > > EXCEPT (TABLE t1, t2, t3) > > EXCEPT (TABLE t1, t2, TABLE t3) > > EXCEPT (TABLE t1, TABLES IN SCHEMA s1, s2, TABLE t2, t3) > > > > While flexible, this can reduce clarity due to mixed styles, making > > the statement harder to read. If extended further, the syntax could > > evolve into something like: > > > > CREATE PUBLICATION pub1 FOR > > ALL TABLES > > EXCEPT (TABLE t1, t2, TABLES IN SCHEMA s1, s2), > > ALL SEQUENCES > > EXCEPT (SEQUENCE s1); > > > > At this point, one might also question why not allow something like: > > FOR ALL (TABLES, SEQUENCES). > > > > Additionally, this shows a potential drift toward less structured > > syntax. Instead, with the syntax already implemented in [1], its > > future extension would look like: > > > > CREATE PUBLICATION pub1 FOR > > ALL TABLES > > EXCEPT TABLE (t1, t2), > > EXCEPT TABLES IN SCHEMA (s1, s2), > > ALL SEQUENCES > > EXCEPT SEQUENCE (seq1, seq2); > > > > Although slightly more verbose, this approach keeps each clause > > self-contained and explicit. The meaning of each part is determined > > locally, rather than depending on elements appearing far in the > > statement. > > > > The current syntax in [1] is simple and easy to follow. We have > > retained the current implementation for now, while remaining open to > > further discussion and suggestions. > > > > [1]: > > https://www.postgresql.org/message-id/CALDaNm2-Ob9qPR%2BvqUSVMkxYO8RW4L= Q_S1XiB0Y7xa54U%3DDqbA%40mail.gmail.com > > https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h= =3Dfd366065e06ae953c4f2d973d5c5f0474f3b87b6 > > > > [2]: https://www.postgresql.org/message-id/CAJpy0uB20MhJJEaPJdm31t4fykJ= %2BfChA_76jU2P9HX5knbJvAA%40mail.gmail.com > > > Thanks for the summary. While I find the current implementation > simpler and more intuitive, and would prefer it if we were designing > this from scratch, we must consider the existing patterns for table > inclusion. Since the inclusion syntax already supports a mixed > approach, users will likely expect the same flexibility for > exclusions. For the sake of consistency across the features, I believe > we should move toward the mixed approach, despite my preference for > the current structured style. > IIUC, you think that we should change the current syntax "CREATE PUBLICATION pub FOR ALL TABLES EXCEPT TABLE (a, b, c);" to "CREATE PUBLICATION pub FOR ALL TABLES EXCEPT (TABLE a, b, c);". By now multiple people (Dilip Kumar, Peter Smith, Sawada Masahiko) have preferred the alternate syntax, to move TABLE inside () to make specifying inclusion and exclusion list in a similar way. Unless we have more feedback, I think we can change it now. --=20 With Regards, Amit Kapila.