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 1wfh1C-005ax6-1X for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jul 2026 16:45:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wfh1B-008Y2H-1Q for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jul 2026 16:45:33 +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 1wfh1A-008XpZ-2s for pgsql-hackers@lists.postgresql.org; Fri, 03 Jul 2026 16:45:33 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wfh19-00000001Kwo-1YEy for pgsql-hackers@lists.postgresql.org; Fri, 03 Jul 2026 16:45:32 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-39af64026dcso6323251fa.1 for ; Fri, 03 Jul 2026 09:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783097128; cv=none; d=google.com; s=arc-20260327; b=TMskt6M2ob5kO9BakQW/II9J6LlgD7zvcrG/eI2ZshpGnSe3BlCFp3B1jzvyMxLHoS jc8d55vX4Ns+KPeApZ6SFLRD+RoD5+WFcBdAMAx3dVIUri95WCakbTSBxZd8/RDJk+8d X7q9WcBSyWk0ILtBsYayTioqRJl/QIheY5cvDFrnFnPzRnJ1B+Z7G+zKJmfWWbh+Jw0O cGPL+W4Ll42I3ey1lo5K84Emt5R563k/AHjgnwfR54yLykSHSJ15whe1grKx7UUeVpfA R36o1hfBlJ3HPGINs26+suEGJ1V+O1R1stYl9PdMgYXvxtzyfsW3U4B4BEPoaRz776g1 i4Dg== 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=diZ8FmgXxa9oKmLcJbsa+9C9J2hxTSEbcej6WODdWrw=; fh=PwwYt04rXj0ykhuu2nf4TEHBuxYJSB6UYLSGTNzEOWs=; b=NVpPtTtdpcP9tztHvr0Q5r6k6AYTDXgW4lKs4Z5CjlSaZWtaJ8Z30rmcde+hC0Hn4K sBetmxvKRbigAH/oQcFqeNz3G3Aiv213N2s6pDksKn+R/qB4Utm+goMdsYFqFGvlYgY7 OtTPM/elzYrsijNw+Ghp4V03gvUDTNdWruGXggThlcmqj+gFaYg/QnHJaHRgweJQlTnK YXgmFLbqWBD0IRnVhvUWFfW25QcBRuodeRYM27jKH21WP9smxLEEw7Ho1DE4IpK9qM7T 2BDj3udck3uRyk3PCLD0glKVp1Mb9+lZYgaxhc6L3iePx3xLxNcLmUyNkIAcpzlFm2z0 02wA==; 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=1783097128; x=1783701928; 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=diZ8FmgXxa9oKmLcJbsa+9C9J2hxTSEbcej6WODdWrw=; b=FWLHZPCl3J+2FytcORKC5nrv6qA46f0Go2hkOB5LZNMCqxXzTDN29KyqRh2VBmFM/c 8J3BViPFg0jDX3hz8WZOasOrDjmNKcrdLNj6gUjDWduXXmPuXbcvpGUhHk17bPETSNvq fyp/KdtpeWchTFMh767vpCBSFHgzyOQMN4JUepA5YoayiCml1hSdESOrawuAVmfUgKCf jzs/2g8OFhc3Lf5X5UNTbbfJOZObz6vzwRIYmrV2u9xl9QUkh+eEOC+cDoqJeqQrCEim sYmGMmgqCkczbRIRm2tDzlRTlYFoOpraujOYRoe9KABbVBnpVhuOjTOY6FSyiX8xyBS9 hvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783097128; x=1783701928; 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=diZ8FmgXxa9oKmLcJbsa+9C9J2hxTSEbcej6WODdWrw=; b=cBo96SqBAak72zxqTFonkGefWtDfELTmRSnm7VuxU4NZAoCCS3TgRNC4nrJXSiN9cY UvcBjBm79L5tSpGyRiHpxnmwHXEw19mHh+fsi+W3/EPVUZU4kpRUcSO6VG4+1pNrw+ZF RUUEQFIoATu/GXnPQhGAtJhVThoNhf8TFQluyuaMkCRSCuEz8H3XSN5m/FfxEZg/xLdx Gfe2nJdVsTRER+teECXGvbSHiupo/Hk3WVVQLMXRZevh/2OE8WRAjgl9/zCKER/tMmNp 75AbNepneCemMvLJ8+qG6HvTY7Rs2CU3XslZD6z9iweBOdxLSXRWVSZGkFkSFJoCOlsd +d+A== X-Forwarded-Encrypted: i=1; AHgh+Ro+9ZS0yA93McPhVLrzRfYK8JLFkl6cZt/2rcXpNBuwcn6DjSr9vsgHT0xHRgVFsaJ6sbc0T71qU3U+/FXE@lists.postgresql.org X-Gm-Message-State: AOJu0YxFnK5HKgUl6XrStu6HZgwVrPxEDoz0LD/ToG7vEEVxM/Wf5ZYO Nq4QAUyckImM0oTA2Yit+Di9xGKKRspBY3E40WAP1hm6WmTetWCo4QA8FKAB2zeCeGseWSDr4Ww CVvlZYaUevOd7+T/l54bSy4ioTsw3eh+Wa4A= X-Gm-Gg: AfdE7cl1X3rCN0gsnwB9/+T1/R6lVdiLJfOi29PVWIBNhqI3cQkDmAFHLEsYweUvOhj KLqQY7oZQfjmRy1HORt+3HdEeSM6VvVz0TDZUZZkv5ayZQcDYbUi+dcS1cr1gbKQ9YkUNtgWS7C GkNEdi0v8bmmWa76t0iUDc63VcgAstd4diKlSDiHiL5KgGYLZ9s0+BUuIDBSRjVGyOIgmgOOuq8 mtMZtCUcnEgcs+R8rp7d71AUjBlB+ifd47HPmhCnbSzZzOR/kIHFJFmjIphj82N2T7qeiQA0p1S ZcA= X-Received: by 2002:a2e:b8d2:0:b0:39b:1825:d56d with SMTP id 38308e7fff4ca-39b33f6fbe4mr26444071fa.6.1783097127474; Fri, 03 Jul 2026 09:45:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nisha Moond Date: Fri, 3 Jul 2026 22:15:14 +0530 X-Gm-Features: AVVi8Ccwui0L8272Zbue3HH0L9c07Ojg9XujQrkbghPzuaR_5fEL_5tojvpDTkY Message-ID: Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications To: Amit Kapila Cc: shveta malik , Peter Smith , Zsolt Parragi , pgsql-hackers@lists.postgresql.org 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 2:34=E2=80=AFPM Amit Kapila wrote: > > On Wed, Jul 1, 2026 at 3:54=E2=80=AFPM shveta malik wrote: > > > > On Wed, Jul 1, 2026 at 3:42=E2=80=AFPM Nisha Moond wrote: > > > > > > During tests, I found one behavior that needs discussion: > > > > > > Consider a partition hierarchy where the root table is in schema s2, = a > > > child partition is in schema s1, and the publication includes both > > > schemas but excludes only the root table. > > > > This is the exact scenario I had in mind when reviewing > > 'get_rel_sync_entry-->GetTopMostAncestorInPublication' flow, thus I > > suggested adding comments about intentionally fetching the 'Exclude > > list' only for the Root. I was about to test it in my next review > > cycle. > > > > The first thought is that if root is excluded, the partition should > > also be excluded to maintain consistency with the 'ALL TABLES Except > > ROOT' behaviour. But then it needs to be documented too. > > > > +1. It is good to be consistent here with similar ALL TABLES case. > BTW, as we can't exclude the child table explicitly, this anyway seems > like the only option because otherwise, users won't have any way to > exclude the child table. > I've updated the related comments in v18 and also updated the CREATE PUBLICATION docs to clarify this behavior. -- Thanks, Nisha