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 1w52cb-002ptl-1O for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 14:20:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w52cZ-0076Is-2H for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 14:20:40 +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 1w52cZ-0076Ik-0y for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 14:20:39 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w52cX-00000000nkB-3YIs for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 14:20:38 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-59dea72099eso4964185e87.0 for ; Tue, 24 Mar 2026 07:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774362036; cv=none; d=google.com; s=arc-20240605; b=X4jqqe+ewqr7ymE5kBzwjO6Z9iUyMiGtDcuRafBrSuONHLnIt7AB4bMX8cgEjUwkou kCwqWAR6LXSm2jaTVTe0XWkUeBOqhtukfKjS5NycZy7cfcPdNH7G7lx3SObEeG7O2dtp TvuV+dpz6hdazowufukULB4hrsNkAr7yJ9TznZCnwAEKdGPdhqqPrZD2e0ZOheOuJfBv zbni7pYje6avS0goL1NemVyPTh/CjadP2u9xfG59wOEQVop4MZ8CGB+XJ1kHv1xBH0tr ctssgkdEDGYqSaNEBInJ4ZoU0JEHpgyia8CLZm0KmUuXF5A5IDEm/1rTVCgpMRovSuKc tocQ== 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=ylOmD+l72O8t2mEgLiCRfzTODMIVVg/kv7NAvr4J27g=; fh=1xRzj7Ul4X/yi8TrUMtLFb8SzwChMmGMTrFtGzbqKBY=; b=bM4g/dJrb0JDNkUOMZQU8bxG6e6Rzzs4m9JGa4dgBlumVPHqvJC0orLIdDgpSL9vhM geOjwSMjK2X7OsmudJQyQC2fik8HX9iB278WuSvZlm6gl8XwjePs8tejPr85vNKPVjeq OoFGyCcvrBbLYrIokkm7LXLxpVwMq9Z6xqkt71YApr20cUeRmtr0IVpUJCv4SPDa94WA ot1xsu3UsdP93t/8ryNYLGpuEffr703LO+4I0oBUTsvBzNTx+Jsll4VDI6OXh0mkDmYA 7A1eXWV2yhweU/mC/UldcVINKtZOxdbtwuRGgx07qoo0FQ56qj8DhLItr7YcqGeWzi5L NYkQ==; 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=1774362036; x=1774966836; 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=ylOmD+l72O8t2mEgLiCRfzTODMIVVg/kv7NAvr4J27g=; b=GvwqhOKeYtZbNQoTkKmz7zrPdOS8DdNgzs2D0M3EJSluY9cFarpXT6ll39DmWN/NjT czEZm2Uq/oqPRmAomJKlTiPPJm4qXJyY2bpyNC/Npxfbd2af9j9hRzjyPmjAjxTy/LgC oByQygWh3LfyYfvo1WzufHb5q+C4ywssUYZmqCnehRzrSjuet5y5Cuh4mbp471QVNQcG Cqu2wtraMTykeaStnhhfcbBFx5e3h0MTLe+4UeLax8e5sjG/CT7OY0oaUWh0M09QDEFc AKcUzS9WQn1xhiGKXmc+4P9GbJYpiAA1cGHPT3IM6ZVDJJICtqsDaaUO46YfyQSMfNxz Q8RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774362036; x=1774966836; 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=ylOmD+l72O8t2mEgLiCRfzTODMIVVg/kv7NAvr4J27g=; b=s1OBJFBELSv41Oyf2zQRnAg3ugG/zLp75LreQUsGKECND9HJshKKZtLGq+mQDsEgkZ pD1c40PkIx6GWTlAUDqZQhKi8to6KcJLJGtjPqsumgFzEraWUXnwqtuhEz+5U3IErPuU b1KEg1O0iPeLtpv86MFzZ3mbribzZL8TuyRO/fqaWaRMELHXT/slI359t4K6JOqpshrg 5SVdtRMq8unN+jUbmQDZWLr6Idm/c2I+QlkilAfRHl85OwcWRFIQxVPwFkVHB93ZojDm C2ndKjFZ25b9g068zjJUyuUK30KdZG/R+EBmGXqD8kwvkjDvbb/Dj4q8MKZa4xZrVVEH KqzA== X-Forwarded-Encrypted: i=1; AJvYcCUAnR4f7M16F8HLK/zYnXMFySzf/sgP4wxph2NvOxVeN0ev+5825s7v6fuIejHgYqLAToB0ZXs5uv0H5WDk@lists.postgresql.org X-Gm-Message-State: AOJu0YylFS2V9LFJOUHwjc3GmVfZ+Y6yiQZYaQdy+F4Kz/n/RUY2VdMM 3W+MxGVYvrKaIwRxQdu92FR8daNyFfdJKCv9MzK3dlgUUhifVv6HCdjw8ebl08e4ZLOUUPyTtiY iu5SwRMGvdQeKqJgV5TDadqtbBjEK4AI= X-Gm-Gg: ATEYQzxdA1a0p2WScjMFJQUhmIgR9bR4bXA/N8f50cugJ7/8nAejvKhRXJSjTwDvAkM Z1fFgF7eSeBPjhvJK9zX8fGku2vJxISLUz8s+Z3XPb5zcwekiguF7Ta0P9tkcUTnmuMHsMoTvFJ GTA+GnB54HsBIsTRBlqng/XO8abc/2xhOZxK9hj8bwk34egMluq8SV6tcEr8S1YlosmpxQtTp9A ETSaIR6PY91yNrVFX9a9hyqMx7T7BfYn+golV3QKBOp102saXAfeMciWfFoWsy6d5j6tLi+Dmwr /HVy0w== X-Received: by 2002:a05:6512:158e:b0:5a2:8212:29b3 with SMTP id 2adb3069b0e04-5a285b61725mr5611014e87.35.1774362035661; Tue, 24 Mar 2026 07:20:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Tue, 24 Mar 2026 19:50:18 +0530 X-Gm-Features: AQROBzDdoSHoYKTZUZ_RHb9_GhLqZ5UkfrSUZhqnffI7coqpc98sFyug2jFnUkQ Message-ID: Subject: Re: Skipping schema changes in publication To: shveta malik Cc: Amit Kapila , 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 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%2BvqUSVMkxYO8RW4LQ_= S1XiB0Y7xa54U%3DDqbA%40mail.gmail.com > https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dcommitdiff;h=3D= fd366065e06ae953c4f2d973d5c5f0474f3b87b6 > > [2]: https://www.postgresql.org/message-id/CAJpy0uB20MhJJEaPJdm31t4fykJ%2= BfChA_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. Of course, this is just my opinion, and others' mileage may vary. --=20 Regards, Dilip Kumar Google