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 1v34ZD-00Avnp-Ab for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Sep 2025 03:28:47 +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 1v34Z9-00GVUH-TZ for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Sep 2025 03:28:44 +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 1v34Z9-00GVU9-JP for pgsql-hackers@lists.postgresql.org; Mon, 29 Sep 2025 03:28:44 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v34Z7-000dvS-1T for pgsql-hackers@lists.postgresql.org; Mon, 29 Sep 2025 03:28:43 +0000 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-8582a34639aso272333185a.3 for ; Sun, 28 Sep 2025 20:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759116519; x=1759721319; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lmkIni5QD+6otxGoZlCNTVbiAjhyZcd8WpZvSFQxD1I=; b=I1pgrjRx8ExkQsXRGqWypqiJo73aZEE6EvTJWXS8yjE7z/5qjq65yD6AcDFUumTuZz 6gKm5Gd1V8r5mIDp/cQ91P66huP69NqZ1J/8C7uA4ex/3oGhvzXcyFOvITUsNIxwn49S yGFXzVkCJDvFTBFMT7mLBhpDgQv9MtS63r6SsBvRKr1SAneKEl5JZ8jYE8WuPCIybJaR Ohn/3mOd9DdoAOyd3sIdx0ltlz0ANG9Oj28WLrG/yjfJdWk+qstdmfgTO1ijI6ZsHDN6 KeoXJaTp/FSKwSeQPi9YM/oE77zsuqo0RzE1K28IcQZL5lgkkt4/UnOGEgPDNS4k4pxT VsOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759116519; x=1759721319; h=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=lmkIni5QD+6otxGoZlCNTVbiAjhyZcd8WpZvSFQxD1I=; b=DryxywTacoY452Vk1akcPb1xRdVR6Qb+q8tzbEnOX1fyg6ZVNamvz9TlR6BkfJSdEv tj7v9/kks0BL9NHJqeqo3J3sdtDw/Owz8vNMCRMkxXwmDwMTtt5clbBY1Yt0KEuCOwgw GeRKKe4EM3RhO2MSgZHcAylQF9+5b8iyMzO1vTNl/TuvhZKCU0ix08lI37Bxqt0FUmLi PkRwJD6YbQSEq2aT+Fn7MbqC+kqDBiN99cwI4QW//lmPsijM/tRzMasHm2FuKAjOO5q/ uruN04XqIrIcpPzd7wqTF+RkXPxgyHjjAdZ8OW2zSZ2JxvJDQwteNbiw+h5/MB/oVkIN ae2Q== X-Forwarded-Encrypted: i=1; AJvYcCWg/S2J3dhJXav4rq+RSXbnvJRClzN9IHNXZgqeSzGgWHlPVhlroSJx1TrL4DwD4/Jvz9W3nOD2yQs+jzbQ@lists.postgresql.org X-Gm-Message-State: AOJu0Yx1Jdbhk8CU/rPmPodYaruoLASrfYmSOyO8yyvpCW70YsSp9eTk ItnVlQOGMfVed1e1/mdSHrQqPQEVP+OdxxwsYgjEPOtobi8i/+FVezIwtX0whDNbxr3qynqULcD I6WgV+p7KkvquXShYbnrGTHY07V9bgkI= X-Gm-Gg: ASbGncv+NrZqZ+3wFeea8MRqqUQuGdozARWAcaZFbZMtNaO8uz8o9N3K/ERh2wg4CXW xkT98D5oXnawG+nUEzdo5zcLXatvi4ddVmYynclRqnVkwLJLweKldv7LKS2kIjvD2lI2RKVptKS OMw9XVmOik4KiO3m/RifEY2HVUJ8GI0O0zkos4hZcB7WpMVjDcldHoV0FOsMNjyCjZiNzJpN5SU LleBWGNqH3nD9xA3Iloji5e0S4lZQ0FjcDjOfY3y8kILUuR4fhd X-Google-Smtp-Source: AGHT+IHfML/nBybaH8/cFQzT9tPWrxEeZUY1VdnQgzbn1xdXt6xUaMJWImqDU6/FPLSI7jHrXQrkeTpQJ01NAzPTaj0= X-Received: by 2002:a05:620a:31aa:b0:85f:ffc2:b631 with SMTP id af79cd13be357-85fffc2b8demr1387789985a.67.1759116519277; Sun, 28 Sep 2025 20:28:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Peter Smith Date: Mon, 29 Sep 2025 13:28:12 +1000 X-Gm-Features: AS18NWCwn-g3_jUr62IPhcrGPv-MHi3COl4dsPsa6bmzrDIsGFXcaHei5hhnGFw Message-ID: Subject: Re: Skipping schema changes in publication To: Shlok Kyal 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" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Shlok, I was looking at the recent v24 changes. ====== 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 specified + 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 = '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 = {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. ====== [1] https://www.postgresql.org/message-id/CALDaNm32XQDR4qsOhPQeophVbZ8r%2BShJSSssoVfdPcwG6joPHQ%40mail.gmail.com Kind Regards, Peter Smith. Fujitsu Australia