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.94.2) (envelope-from ) id 1v3SRD-00GYa5-Cg for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Sep 2025 04:58:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v3SRB-0067KS-92 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Sep 2025 04:58:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v3SRA-0067KK-Sc for pgsql-hackers@lists.postgresql.org; Tue, 30 Sep 2025 04:58:05 +0000 Received: from mail-yx1-xb12b.google.com ([2607:f8b0:4864:20::b12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v3SR9-000pgJ-0c for pgsql-hackers@lists.postgresql.org; Tue, 30 Sep 2025 04:58:05 +0000 Received: by mail-yx1-xb12b.google.com with SMTP id 956f58d0204a3-6353e91a04aso4367235d50.2 for ; Mon, 29 Sep 2025 21:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759208281; x=1759813081; 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=x5CACulppXcsTkVAdYb+OYrFsutBj0ieWPNECWpWr0w=; b=jI86mIIToCnG5oMzR/rULkQ6pkenOZo7tQPP4XkbTSsgqwDUtwuXmU3xiCCEJfYvhV 6ztt+sEyWRw3txNniKtRw0KJ5pZMQrsLUQCUQIfadlZddCyg5oXcRleobLZV3lOZScxV fQio2S5xE9cWcEaI+0ls1vQ1LUevuMeJz0W6C2zrSyaq//+4M7sHpkrRhvK4zCcn7Co6 xqb6mWWcR7qTLFUJOkrWknexdxIVKhyPtKGieJmbYBXl057zY1Q5K7Tge9TLGzOL0n4z +L87JfvMvt+GJsZjgTqnu1m7zZlxTTZj7AWXhIxmBxRj7MTRE9UgOLZA6vRBivBCLWdV AI7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759208281; x=1759813081; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x5CACulppXcsTkVAdYb+OYrFsutBj0ieWPNECWpWr0w=; b=eGvDcLPC+Me5h8G6pZnZHi+N686j13zUgzl31X+T0j93+4djM3D6/uOLEoNXilWZSl Ah/8O93dtinhopQViVHWOMbwm0XUhLLKZKfmJJK7WF4zZux6VkpcACjeL4EoYCiT/Phg /UCStZQS54M4caKOf/eWZhbK1Fn34uIJ9Qxvy/5kFIrHfYfwDB9cuee5R8JTFbJQLkdv XHQoAK/Pwzi2LaawAh4XK1L6x6r832zMoFduWT6KSfS+GLtVE7FsFSuRU4vUZuZAodL/ +0nWBPuqrxyJBZtqAWQCQI7mprib1udZqBNx0fydnopWf1UPEaITMGVxgr62CFizB3RD nfDg== X-Forwarded-Encrypted: i=1; AJvYcCWCYcE5Oh3oTIOU1sDsJvF9op5C3PL1KZ66aqMldFtCKlX9hQ3hISnHIoUUPysYm0tQWakn6dNjzAqjLiC6@lists.postgresql.org X-Gm-Message-State: AOJu0YwjwkB56+jQhruu0vXhPV+Qs0oW8Ubu9A5euO6IIw24N1yTFaz4 RLK64EEHJha62uj7HmARTNQGpWIFiGsSXlGhgwcWtH6fgX4LHXhON4P69eWzzf3WquZtRDVExp5 IGeFSOIA1iFKweelblVXctmelKwy5v+o= X-Gm-Gg: ASbGncuSvfyRqBNIQlJ0Qu6ZXlEe/YWppzvtdPlZNa3wi+m5XZ1COZltGVbO6c/Y0bQ f3KuPjbAFRDwTz7nCFJuY+vekCokQ0MmGDhAaro0f3zBk6MDYlSrxZVXJYDXY1iwFcDc+WWSTmk pQlpC7jvGYF8pIJwo1ErGAd3G6bLXiUDVcednQ8l6ru5xD/ne94UUjtOcRooFD4SVtNhmMkI2mD WsO6Ay8jV0fgCeLsgC7uiEZk5D5Q1cCf9B8DhdWr7Fn X-Google-Smtp-Source: AGHT+IF7rcf/6DDEc2PNtugXbjUtGzHbpBQWiCExzMBXY/nC3cShpN/Dx0tfcVRK1hy/WSG7/PbgQUVThl4xiAGOjAA= X-Received: by 2002:a53:b086:0:b0:636:d286:4833 with SMTP id 956f58d0204a3-636d286509dmr12855950d50.6.1759208280517; Mon, 29 Sep 2025 21:58:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Tue, 30 Sep 2025 10:27:48 +0530 X-Gm-Features: AS18NWBkzeL1PSMXYAzd_SAHWFOdzQN7AB2yyTTv-KNmrgUmQ6jEEw6V4FJcwe0 Message-ID: Subject: Re: Skipping schema changes in publication To: Peter Smith Cc: Shlok Kyal , 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, 29 Sept 2025 at 08:58, Peter Smith wrote: > > Hi Shlok, > > I was looking at the recent v24 changes. > > =3D=3D=3D=3D=3D=3D > GENERAL. > > I saw that you modified the system view to add a new flag: > > + > + > + exceptcol bool > + > + > + True if a column list with EXCEPT clause is sp= ecified > + for the table in the publication. > + > + > > So output now might look like this: > > +CREATE TABLE pub_test_except1 (a int NOT NULL, b int, c int NOT NULL, d = int); > +CREATE PUBLICATION testpub_except FOR TABLE pub_test_except1, > pub_sch1.pub_test_except2 EXCEPT (b, c); > +SELECT * FROM pg_publication_tables WHERE pubname =3D 'testpub_except'; > + pubname | schemaname | tablename | attnames | > rowfilter | exceptcol > +----------------+------------+------------------+-----------+-----------= +----------- > + testpub_except | public | pub_test_except1 | {a,b,c,d} | = | f > + testpub_except | pub_sch1 | pub_test_except2 | {a,d} | = | t > +(2 rows) > > ~~~ > > I think this was done in response to a comment from Vignesh [1], but > it did not get implemented in the way that I had imagined. e.g. I > imagined the view might be more like this: > > + pubname | schemaname | tablename | attnames | > rowfilter | exceptcols > +----------------+------------+------------------+-----------+-----------= +----------- > + testpub_except | public | pub_test_except1 | {a,b,c,d} | = | > + testpub_except | pub_sch1 | pub_test_except2 | {a,d} | = | {b,c} > > I don't know if broadcasting to the user what the unpublished/hidden > columns' names are is very wise (e.g. "{password,internal_notes, > salary}", but OTOH just having a boolean flag saying that "something" > was excluded ddin't seem useful. > > ~ > > Furthermore, having a Boolean seemed strangely incompatible with a > normal column list. e.g. Lets say there is a table T1 with cols > c1,c2,c3,c4. > > I could publish that as "FOR TABLE T1(c1,c2,c3)" > Or as "FOR TABLE T1 EXCEPT (c4)" > > In the v24 implementation, AFAIK, the view will show those as > "attnames =3D {c1,c2,c3}", and except will be both "f" and "t". It > seemed odd to. > > ~ > > Lastly, I think the EXCEPT (col-list) feature was mostly added just > to help users with 100s of columns to write their CREATE PUBLICATION > statement more easily. Since the view already shows all the columns > that will be published. So, I'm kind of -0.5 on this idea of changing > the view to show how they typed their statement. On further consideration, I=E2=80=99m ok with removing this column to avoid potential confusion. Regards, Vignesh