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 1wfD7K-005KiM-0a for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Jul 2026 08:49:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wfD7J-0011U8-0D for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Jul 2026 08:49:53 +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.96) (envelope-from ) id 1wfD7I-0011U0-2Q for pgsql-hackers@lists.postgresql.org; Thu, 02 Jul 2026 08:49:52 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wfD7G-00000001LkZ-2vvl for pgsql-hackers@lists.postgresql.org; Thu, 02 Jul 2026 08:49:52 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2c7c61b5292so17891035ad.0 for ; Thu, 02 Jul 2026 01:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782982185; cv=none; d=google.com; s=arc-20260327; b=l1PphLvDopA+tYuRk9qI3ohmPbAT6YJJR/lHmFY8z+NpMsL2QUDdGX83zq4HAsyaH3 Wm+12sXDmlQoI8oth3/h1zbphvRl3ksmTWvHfgcSVDQBx5caON0Umb96XNrpwHQz2rKh WXKftYt02J82v2JmryjFqwJCy1Ym5kHbZ3XBxzg5b+gOB3B2Kn272L0GT1AI+laN686s 0NXpFOnRbdP6HFHsxyArRyQ9IHdHHjEE+iyB1v8F3Wf1HJbJaSqbBUkZpBniZxHJ87gJ o1rAwY134lYsXuqVG2e2HsFFQlCQ3yoxYWeddrmoLclSZZ2HycMvWYGPrtknxHVxuD94 FPBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=550Cet+deU6TklOyvxv5Llpb2Xmcpn8130WfOYr1iOk=; fh=D9gBIS6a8mxoshDtRbvNlhjE2AO1qLlx8JGAp9rc0Hw=; b=AF0Zw3HLEM5dACjQ9kAyJNuO0YpPS5BqdyP82WG0wneZJX7TsObjRYOt6dfZDFuuXQ LVeNMhKo0y8q09au5myLEFg7Uk62XX2Vr/eQm03uUJzjfFlQWsMRmvh03S9BK4JEsT+D wMwcP2WziWpHipU0MQydRrVzjG9Nsiid49II5Dn/gIxS3cB3fJw5ZUXpo5k0apDeBK2X 2SYve2xtZt/T4USVtiEH9I9XpDcJQSYV7Or+sJ6rO1iO84g84sErxBGUM0AHEc1FjF9H hRq2ThgypE5CU4CB/Uy2gZ4b6TK7Z2gWV6eNRSQtKyjwAekwK7xAy1+NsV5G0JEdUvDe G0Vg==; 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=1782982185; x=1783586985; 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=550Cet+deU6TklOyvxv5Llpb2Xmcpn8130WfOYr1iOk=; b=J9dml8+0JJWTwRA4Os9fhGN1yy0o8mlnYCI6g5OSkgkIoM9AjBXUZvF28jI1rQLRz0 IePHY4gD8kv3BtcnalTP+lJofKkbHiXBTydMUPGSVEh/T4UwLaatQS2U7D2QuyJ6Vir+ YXK1qwSTLEvjMF4Fj8intCSoye8T5BCvPiBS9zz2cszxn2Xmse1fb4V9bTC/4b9VfIGN 54QBns7cOI/hInFswXxBmGMApr/8G5eTTifeAL5OS7J6DajkiXo7t8ayJ56g7Bs3zFZ3 0XuBOktXDs9pVAJba/Nk1SA+jlW+u8VD84f3V83E0UVBh1xZcEievjF5qKfnHJ50r5t4 z8fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782982185; x=1783586985; 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=550Cet+deU6TklOyvxv5Llpb2Xmcpn8130WfOYr1iOk=; b=dQlc6PCzxIVK+lfZwJHLZ7NN8fu5RrZHm8nw7aLKuX135t8htaRWY53nRyeXiClabw wP0VnttYe4qzFHdZOFEYunzTYB9vn4wiPWaPibiYm0zo0iWGOUkBBQb6rjnEqyCsdwJg DuJt1hJpA7ciBjRH6GovPEZJF/mk7Cbtif21pucs+qb7DKpZT9ePKubk85+qhT2P2Ath GmLd008lW6KUKw1QjYZAeWIlEo89RH+Ullux25rXenRsVpRT0jQopnVdzq8F0SRa0Wct ul0SeLU09MCs4bH43+Q/F+L4ihqCKS1Mki7p0dGhLuXflghz8nV90vjWyZo8mGGIcr5m yAZA== X-Forwarded-Encrypted: i=1; AHgh+RrUmOnR7xOByX7twSwwqfoI4lBqMsm3vYwqScSh/tQMJtKdM2Qee5D97cWvX6v1xyCko1CNRT40SF0lM0GU@lists.postgresql.org X-Gm-Message-State: AOJu0YzkJ9C64x6o8b3k0b/W+vPWp3vpOv/VOweti1+gEvvVNvb8Jlx1 Wty1dq4Xmdnzehiliw3FXrCJ9uccp/gYRDls5RptrmxgEGC+aa7yMBdVO1//cf8NZ/ZLcoaRSKs u4kIZJL4rXi1NReZ+qcx8AP6JFENkipM= X-Gm-Gg: AfdE7cn/G2+uXkVyuPVepwBuUzTCbjii70LNxFqAa3m+HWfASw/Y8nTi4JteGEC+6gS N6Z2EACRDN4w43ra6zcxvW/Mzd9Wd4DM5m6ftHj0IpwDRieCfJcULNBGD7ClGxyW4m68uL10dEI FEvwpdrsA5fN0zuT+YgJ4XvKJ0/jD15GNSnRS9EhZOxV+KyKPeGCUAhtcOfVC2pC0plpdUWcvTl h3CZ2tRdmKcDvHR/gUqRquiSpUhkCs/rD6nocvs6YfeArmeu4CocpC0J7bVDInmQUyV1kzw7iO8 RFaGUaELc2QE3eLYaOitX4bR0AA23vWjzq6VTUwJ X-Received: by 2002:a17:903:1ae5:b0:2ca:11af:5ee9 with SMTP id d9443c01a7336-2ca911de572mr46042725ad.25.1782982184695; Thu, 02 Jul 2026 01:49:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Thu, 2 Jul 2026 14:19:31 +0530 X-Gm-Features: AVVi8CcmMyUF3b6BnHfxirIrtGidrwrahe4iU4Va4vyaJpSUhBo_dJI6obiq_u4 Message-ID: Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications To: Nisha Moond Cc: Peter Smith , Amit Kapila , Zsolt Parragi , pgsql-hackers@lists.postgresql.org, shveta malik 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 Thu, Jul 2, 2026 at 10:21=E2=80=AFAM Nisha Moond wrote: > > On Wed, Jul 1, 2026 at 3:46=E2=80=AFPM shveta malik wrote: > > > > On Wed, Jul 1, 2026 at 3:37=E2=80=AFPM Nisha Moond wrote: > > > > > > > > > Besides the above comments, I found and fixed a few additional issues > > > during further testing: > > > 1) Fixed an issue where UPDATE/DELETE on an excluded table without > > > replica identity was still blocked. e.g., > > > > > > postgres=3D# create publication pub_h2 for tables in schema s1 except= ( table t1); > > > postgres=3D# update s1.t1 set c1=3D3 where c1=3D1; > > > ERROR: cannot update table "t1" because it does not have a replica > > > identity and publishes updates > > > HINT: To enable updating the table, set REPLICA IDENTITY using ALTER = TABLE. > > > > > > Excluded tables should not be treated as published for update/delete = checks. > > > > Nisha, this bug was introduced by your patch or does it exist in 'ALL > > TABLES Except TABLE' too? > > > > The same case for 'ALL TABLES Except Table' was already handled > correctly as part of that feature (Ref > -RelationBuildPublicationDesc()). The bug was only in my patch where I > missed handling it earlier. > Okay, then we are good. A few comments: 1) postgres=3D# alter publication pub1 add table s2.t1; ERROR: table "s2.t1" cannot be added because it is excluded from publication "pub1" It will be good to add hint in above error. Suggestion: ERROR: cannot add table "s2.t1" to publication "pub1" DETAIL: Table "s2.t1" is currently in EXCEPT list HINT: Change EXCEPT list using ALTER PUBLICATION ..SET TABLES IN SCHEMA .. EXCEPT Please rephrase above as needed. Look earlier such messages/hints already added for ALL TABLES.