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 1wFm1B-005X09-0A for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 04:50:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFm1A-00GygU-17 for pgsql-hackers@arkaria.postgresql.org; Thu, 23 Apr 2026 04:50:24 +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 1wFm19-00GygM-30 for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 04:50:24 +0000 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFm17-00000002MNB-3TA0 for pgsql-hackers@lists.postgresql.org; Thu, 23 Apr 2026 04:50:23 +0000 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-358e3cc5e7eso3696623a91.0 for ; Wed, 22 Apr 2026 21:50:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776919821; cv=none; d=google.com; s=arc-20240605; b=hXAA2e2veBhGvEFfZRjmbJj4GBe/eGGSd3xXATNYioCgdmZLIf8YQNF7t9a3c+yBE/ es7QrzdOzdWkbNukfrXGcX8qHqSiFtHOFcQMrVpvRChKCzCyXr4pPeGImcKPRC0fKjeG KykVuOVbkpf6uaAmOpADkJw2SjMoapvIzytDtlOn4TyRHWl/AfbwpxXwyPkmN4PD/VfB /j356/urVfSM+5XpAUkQu3NY1Yjwm25wssSGGkApfkuAr04WHwUDzf0/mW6w/e+NOsoP 629tf1ks2LEFlXFM9NRYxoqML9+571IfXuquxpTaL3zDpVGOntBs/OKgS8jz9lRInjaJ 8gBg== 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=W3tiIzAe4fTdR4lP7BffiaDJAMaGC0v96PPgRwMWdQw=; fh=udDsvwdjOrU63Ko+pT4c2A59dyfxU5zNidzwDsAh9J4=; b=lAXN+4/vTZ6Ac58ewyCDoEWVrSq5KsLMeiq/loySlUq+LYLChLH8TdtGz5B93nYmFi GUVdNqaavK5/Mu4gJ0GzsGpX8LbDakoORQ7S0tmDlrWGYO4+XdifdLqpl+c/Ja1QNxbE ZUEuXxKfE0R5y8j1y7K9aQ3NjwUzSXkrEkG+yPrT3b0M+JkGxt/tE/rm2FwSS93P2Ot1 YOvK1LTv/UafDUlTQzQTWBU82F6PrengYdM2I7ZcWEZRxegyUGmCBYFID5idIg+nQlqH A1iOSEVeTLmx+Oq/xcL4EI1WtiIOMvRXOoP49VjLegdBgQqNCn8PHOax9wlHIH7r8Sf/ NJHg==; 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=1776919821; x=1777524621; 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=W3tiIzAe4fTdR4lP7BffiaDJAMaGC0v96PPgRwMWdQw=; b=fKS9DANeF3GHU7vaqi5fkjbw8sMxXn/PGfsNJhry5YzIfL/dmZBpNiFXjgccRu0/27 12b/2fBwH+ca5DygLsF7WCCVDLJFgs4HBycrfx2N8569fgbqkHpqo/keYp+AIrTBUJJs 5djr/TFSXmTIfaCwqf7NMDq/uT5T5cVGWJt3bbe9hlrW0wo5qB8DuGEdDYXTm5iIZdC7 JPrvURYNWtIcGDM7ZE/cto+GRgwuW/oHAI2JAIOHvYE0BkpcZV+X8GZt5nsHIp8RWZXw z72epjD13qMTxiRp1NHrzw/630GQd9RWqeF7IeX0owZITAeo4WToNdcIc4lj0uyWXH24 vO9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776919821; x=1777524621; 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=W3tiIzAe4fTdR4lP7BffiaDJAMaGC0v96PPgRwMWdQw=; b=Ofovfmj3NiiItg2H5v6xz1aO9sNwn0xGyPK6RZkd+0nzM+SPNZgAW8cK8IegtJrvDF sXApFaul5l05H7cjSuYp/Qlda2RZ7sMGGBhgye642F9i3NsfwTl8HRYWxqRyXee5XTN1 1D+oHUk+yj4PqEZMXoFqj2igiG1av9ettszKbzgZgDr4QCyghZVJLTCtFE/e+VJP+2xF aFh+J2tpaiOi8mchldESMfwjdKpjVA9HI4PmFoOLaaetsGNa5TLZbvZxSIRZGnlVRapT JDJiLGff43jpwAa88WDCNppnEOVNOWOHLpYkmm1fO7rl/a1bF+5vpxRhOZowx/KRdxOU +m8A== X-Forwarded-Encrypted: i=1; AFNElJ9sKfHI/1WCyHeNxSaVwCxH+1/10RMxdYLrXjZe5aUCUo4hnGetaI9fKFo+Km9cN4IPkkSsqEPXNKDwf4qn@lists.postgresql.org X-Gm-Message-State: AOJu0YwQjfIJJEftRqE06AQpO9MmPfzEux2a+JbiCkIvlsssRWN8ECTl L9GKRkyaeiIWtmLBuNm7mfw+St45Zx0jR5MU4PCKs/+rN87AXTTnjCkuN5Q+5Q3oebSVSoDEb+8 uVyjlKSXQ+wQL5KZjaT7ZXW5hAZ/cI7U= X-Gm-Gg: AeBDiesz+1ZXOvfEgkln3ul4/+w0CSECkyD2yVC8EK9bFBd1bAxNuOJkIpiZ/6cqI7c vQ9tj5oLVWmZy+V6R5nE/CO6XfOCeU83x240j0M+6GPEWcd01Xn4wxIJ8goTvx1fZNE4njF4k5s 8x9KyFhr9ZgTG5JqR+stJdX2H5zwe+Tvk7Ye2Ndn5Pp1cQlzTntwmyQgSKkHwGe6a04YxAD+h1g lnYjFmxennW6KSimmy1QwUouyar3bmd/Py6a2RJz7vRV1+UIhqy2lBjhux6lFlVbtmCqLpW+hYA eA5r7m0PIQN1iSPK7DY= X-Received: by 2002:a17:90b:3811:b0:35f:c729:de9f with SMTP id 98e67ed59e1d1-361404c2053mr26138085a91.27.1776919821157; Wed, 22 Apr 2026 21:50:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: vignesh C Date: Thu, 23 Apr 2026 10:20:08 +0530 X-Gm-Features: AQROBzAU31OAH81Qln-bJXfpOLGz6heMKRJ1DTjXGA7Qbpg-VZiytjcDW1W5i1M Message-ID: Subject: Re: Skipping schema changes in publication To: "Zhijie Hou (Fujitsu)" Cc: shveta malik , Peter Smith , Amit Kapila , Shlok Kyal , Dilip Kumar , Masahiko Sawada , "Hayato Kuroda (Fujitsu)" , Nisha Moond , Ashutosh Sharma , "David G. Johnston" , 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 Wed, 22 Apr 2026 at 15:33, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, April 22, 2026 5:54 PM shveta malik wrote: > > On Mon, Apr 20, 2026 at 5:43=E2=80=AFPM vignesh C = wrote: > > > > > > Hi, > > > > > > When changing a table to UNLOGGED, tables that appear in publications > > > via EXCEPT clauses (prexcept =3D true) are currently allowed, but the= ir > > > entries remain in pg_publication_rel. > > > > > > For example: > > > postgres=3D# create table t1(c1 int); > > > CREATE TABLE > > > postgres=3D# create publication pub1 for all tables except (table t1)= ; > > > CREATE PUBLICATION postgres=3D# alter table t1 set unlogged; ALTER TA= BLE > > > postgres=3D# \d t1 > > > Unlogged table "public.t1" > > > Column | Type | Collation | Nullable | Default > > > --------+---------+-----------+----------+--------- > > > c1 | integer | | | > > > Except publications: > > > "pub1" > > > > > > Since UNLOGGED tables are not supported in publications, this leaves > > > stale catalog entries. This patch removes such entries from > > > pg_publication_rel when the table is changed to UNLOGGED, and emits a > > > NOTICE to inform the user. > > > > > > Another option considered was to throw an error when setting such > > > tables to UNLOGGED. However, allowing the operation was preferred, > > > since UNLOGGED tables do not generate WAL and are not replicated > > > anyway, so blocking the operation would be unnecessarily restrictive. > > > > > > Attached patch has the changes for the same. > > > > > > > The main concern of removal table form EXCEPT-list is that once the tab= le is > > changed back to LOGGED, there is no internal way to add it to the EXCEP= T list > > again. > > > > OTOH, raising an ERROR does not seem like a good solution either. When = a > > user converts a table to UNLOGGED, they are effectively excluding it fr= om > > publications. Therefore, throwing an error for the purpose that "table = is part > > of EXCEPT, cannot convert it to UNLOGGED" does not appear appropriate, > > since both actions ultimately exclude the table from publication. I thi= nk we > > can keep the current behavior unchanged as it causes no harm. > > I also personally prefer keeping the current behavior, as there is no har= m in > doing so, and I'm not sure whether reporting one more ERROR would make us= ers > happy. Thanks Hou-san, Amit, and Shveta for your inputs. Based on the feedback, let's keep the current behavior unchanged Regards, Vignesh