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 1wFVoX-005EVi-1z for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 11:32:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wFVoW-00DR7N-24 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Apr 2026 11:32:16 +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 1wFVoW-00DR77-0i for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 11:32:16 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wFVoU-00000002FBo-0Wqt for pgsql-hackers@lists.postgresql.org; Wed, 22 Apr 2026 11:32:15 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-5a4113ab355so5593646e87.1 for ; Wed, 22 Apr 2026 04:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776857533; cv=none; d=google.com; s=arc-20240605; b=khVGXKyWaRy0XClzwpDhblF5cua23S0OUCAezPNqXj6bwKQ+kZBMVnUbMnonoMAIE8 s700yar8pskicj8ewgsxemLkDrrVvZj9zH47jyYWH1RCrPCR7Wgev9JmGDM4q9GFOosz hqPuUs+NDzOya9C6oSheyw03NrFgC0Z44PDGSb5Wjq0IYijvPSHnfNPAwypdRx4bbZjC YDDMCPAGHxXAzUy9NtQ5+o89eTekdyamgzkzh2Xh0pQXI31Fe/dCJ6I0xGdyicIdsiMS P0uSHiIaDIDl3wTwdafsUN34ta+u1PQM2k+oEhyAUDYRZRL/7Rpeu9NuAVub2ptDGOPa HsaA== 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=OGIbEbbew5rhBZkTZTlP4PBpSkwYY4Gy3Twv7oYZBpo=; fh=m+xn4NpnNQz/FJdEE4it99E04/bCFyX5U4cXDKY1xHY=; b=eA2BIaD7UFIHt6Gu5Q+Ow6U0579n4gf9VyiJCnCHT9GIb0oAF4xhY/VSvquTZHqXxS Y7SxH4VQTGMWREW/Jy07poDALfvHel4e89YgwNnph1GpXtP9LY9VcF/zjImtdMmXpuSJ 0E/hSC5+z0JCeBJU/78sZfKSNOip623flB+v9HqRKNSzMZUBsNM85xVK222pUVq+3x9y by0Png0QZKQMTcPlcwoFhU+FCVkCKtNI9LjfDcOfcg1gE1FO0oaiegHgfQDHnc5dM868 0my9sxHTpIlhPZLsHLUF1bkcVoUGomrOV96019rx8FtzE3ybtqrKTg2qW1nYHnmsLpvE ItbQ==; 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=1776857533; x=1777462333; 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=OGIbEbbew5rhBZkTZTlP4PBpSkwYY4Gy3Twv7oYZBpo=; b=DVoq/AwEoDMLrnE8jcJq+4POAfNZcMxENxr3YX0AO4pXzHyaT8EZul1FTumNKbcjfs 4rtcVLQH+g0N/2Glw7FVGKTDIGNfmafaZ0ankbu4XjXCttXzO+j7E8l4Pmh2ujeKn5a5 xZ+xeiZ9PRslmsJsLBTszLqHZibNXqotGpXiopOpgu0+x7u85P7cesZ3qDkuEFy5X65t sYYyeTnkWx+te2wb+BlLkZSeqPTlnwZVRHXdC7FHP+HV8XO9169k/dlha035/dqJdTtf LeYIwPlyma1ISIRIXMZ1PV0suS6WIRnEU0M0kjSsrJZhyzzmn0aovVi844OcYlnVYg1H 5KPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776857533; x=1777462333; 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=OGIbEbbew5rhBZkTZTlP4PBpSkwYY4Gy3Twv7oYZBpo=; b=W+7PsW2p/KFDdricSkGg7sx6s3jKylm8ObGQVedwr1Qp62p4c6ugo+p0PShOG0xBH/ El7PQgs3Zrc3wNFfbcI4ep0ZSn1FfQQ7snH3Bc24ac3AyGDfXrg1KEev+EX6lvDfS/r/ kMQs+Ui5kzCS2JQUSUzuDc8LJFw9yP+e+V/E+guTNma1XpHbyfX5CRk8+RktJtrPeH7X aXcw2f6Sx6GaZjRYp0H5+ueXyhE5/1YboWo4icove6LFTtg0753pNHjsYzMB3Dvgc4mi mYgcLvAQnu+L9BoMxTIcudI/LcoQfYFqIT9Z+HDFwVguinwP8gZWEmtwoG+xdtPZrSNk +EoA== X-Forwarded-Encrypted: i=1; AFNElJ+A+B8MQ/5F1zjSNVs8UrIAmgj6nwpCIp7jqHDxkxvC3YkWlwjaKC0DkQcSN1RvGbQ+yNmHaaSNcbtCng+k@lists.postgresql.org X-Gm-Message-State: AOJu0YxKqeUiNxyNBTqRq6D4vBqAv4931tffQk5Q2iMwAAJ704np1VPk ooX6xfuTdZPYVVyjOokFHSB40XCggUm8b0Lc+sU/Pn7lnDPkeWQ9NHEPlmMzRzle0lLUaah4cSq DDiVYdxHgLuiMEz8cAKl31LrG9l0fmV8= X-Gm-Gg: AeBDievXPclbBK0KwH5BzUBJXnSP96tDwoL1pzIsI33OjKrXdDaKY7N2A0QtjdASvYK ewr/yX13pMBe6YavHkgMkchIBwagx9KlrEKpONKTGSY9IoH9W1ZKxjNPKcfYJTVB45yPkg3iQou WWcZWuLuaaEh4jsIhLneVVwnJxYF19AzoktXusBKuGb7ZAVyfzUL0kc7oCnLzUunWEIkhE6PVdp CHYnTWB855nHQNI0TyDIeiOKFARZU6hHvCGYypRUwCQp+oeQCNMFhXhOrY4/RFsfgc3TS80fmVr Qp5jWqUAHQMERSz7q/KN6EIWSePs0MUA6+BaFyvI0P/EtLSVYyrLypeYKM6jNAdNt/yCgKEHxlq mvsQX1Sd4 X-Received: by 2002:a05:6512:1189:b0:5a3:d381:2a88 with SMTP id 2adb3069b0e04-5a4172e7570mr7570300e87.37.1776857532800; Wed, 22 Apr 2026 04:32:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Wed, 22 Apr 2026 17:02:01 +0530 X-Gm-Features: AQROBzCOGv7Wz2Dv8QKYn_O1j7tJABB0lPdnfJ8L8t7lDP1oP3OjTlSK7LUG8-c Message-ID: Subject: Re: Skipping schema changes in publication To: "Zhijie Hou (Fujitsu)" Cc: shveta malik , vignesh C , Peter Smith , 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, Apr 22, 2026 at 3:33=E2=80=AFPM 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. > +1. --=20 With Regards, Amit Kapila.