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 1werw8-0055mp-07 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Jul 2026 10:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1werw6-00CvyQ-34 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Jul 2026 10:12:54 +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 1werw6-00CvyI-1k for pgsql-hackers@lists.postgresql.org; Wed, 01 Jul 2026 10:12:54 +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 1werw4-000000013t2-3fG8 for pgsql-hackers@lists.postgresql.org; Wed, 01 Jul 2026 10:12:53 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-39b217f54daso4859561fa.0 for ; Wed, 01 Jul 2026 03:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782900771; cv=none; d=google.com; s=arc-20260327; b=eBv2bGsDXJ8BoTyKw/GvWkMB71Hj3rYGKTKpCzBQgvWazg+/r0+hGyVpNjBLNG+0HT CSS4UThZOPgFigxyTRgwrxKNoVuDQekRKPeGUooTBKvIv7DTDvj+3jzk8TxbFW7FMDjb kd4AgeSNMNNepJXlGJJx/6HKyNKlVdTWjnqfVTJFS+d5XyibL67lBL4mcSEWAcd4KyMw pTOaoTFLbKBWPxkOcIPfQ9FqQa2p2mgxJubBulPi/GBCU0S945uvRsE/h+KLe7RHcCn2 HSa23i2xy2ALTQRRP7xP+yXTxkZ1u3YQBUoqFWNnqm2TD6h/cBn8QvNLL6GJkmPw2W+O hVTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=te5dlSmthSb7RomqtYESMN7PE/WIrmBeh1UkVViDH6c=; fh=eASb74XDfF2+Nl4W/ktCgweSnyJgcMFE5KWEUmyQByQ=; b=nmXBHNc690j+2SkDR66OcxJEOIEHw59G6+ND2uf06R8Wm/A4IemVHZ+lgJL+C7B8fm ye61o7cbRJvQ9UZ6bCrWBcDyHAOn8SxgPruMrZTtYteeqAKHWeB1eEUdQw22dql37iG+ Its44kZ40U2pAsQTknQ5DSf5/taAcosIkdznhmIBVAAROd4iEc8HyM+SsdAXPKP70hUz BfC3lh3PHlfcURwOcSCct4C2LFoLy7HMIPySo/BRSMRYBZnfdsbT3Iqj51Ke+/V8Hq+I OAft7EW7jiaSSfnK1TBshcNOU1X1vdWc+oHGhge/y4+PoNExGlZYFUeucZejd4DyP106 5Fhg==; 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=1782900771; x=1783505571; 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=te5dlSmthSb7RomqtYESMN7PE/WIrmBeh1UkVViDH6c=; b=mf2K/nQ/maxaoPLTYFHCok64WUGYcUfJJrYpkqVmaSR/K0xiAgwVmJN+YgXW31X1BA Pr32vEcKG0+nrDREYYezbP8NHn2XPZ+B0mV2ZqI0D5y+JIAEXP+1GTdhUVNdkq2M+Uuy wdGgcTvm/wSqx42wYD3Z2zt65jEXJSfxdi0OUs+FF6MGuQki/2VlnkdJEggQVZ5Ifz6S GrauwFnIzNrf+rvwGYrV7a0kZ3xUkbR5GAJVdVMUlFhHCmz8yYQeZrw1RG2ra3XRAktc ghrshO+kmQJSoKs2Smf53hAuVG2ygQB6KuE59IrG+QW0e90o2gUsdr4puLkdtRm4gU8N tCnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782900771; x=1783505571; h=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=te5dlSmthSb7RomqtYESMN7PE/WIrmBeh1UkVViDH6c=; b=Q4u3E4JqPRGt4wurJIMJ9TH5HQMJ9jqVs7V8Wkl5OttKyYQFyHlUgEi5w1uVIicunm 3MgKgS0IgNpW6m9076+wO+jpMK+bWYDH7kMUqSGKzhK6ZJv3OF4dulmMRF6MJlbG984W jYE78o866Jspucipv/lHdliENGGOegwx7AJRZsgoeIwWsqP9HMXgdXVq1UQ7b0Z9eRHT tHbLdhCHT6T+z696PxfZ1yTlYt1x1rFgXfOvJL1a2NK+JpW9PASMONkwiGiK2/QgfTf8 S590TR8qsLByVPS9hIk3qU07axW6BYAYMrS9xI2N2ne0LTFEuWuFA8PYRSfXQErJM6E4 bSpw== X-Forwarded-Encrypted: i=1; AHgh+Rpf7SbXNpkqgjzujNVbUKnSuVAIecYYR6gUzT1PED6AOdQaNutCDc1RZaIfIbO57kJdrTK9ighTWhJxVVco@lists.postgresql.org X-Gm-Message-State: AOJu0YzRKlbmNjodElErM3J8BidtRx8a9ZJOdciZ+IJ+xpveVdYNTwka +wDqCmIhAzxyS6nq2mQM0N5dHSI2NWIk0FIIQLZPb9aYpMqbNuYWVA9jzYloA/8jkmWqGiF4GHr s7ZY+qeX0R+qUWuREhwE4rbGmAhTSqg== X-Gm-Gg: AfdE7ckFtZ1cWYX715RU0kf4l0NZGZ/OJGEEtI+XXznDb8vgVtUBJzjGmIZxvE9XfCF zl+Z0bY7DBeym+7Ot+xLN66o6xA9psxMqM7S/Sm1aVAflwYipGAFBC6O/iq7KbtlXMw4/YNm2lI ql6HgrOU4Zadh2onKhUic8jUhPNwgMjQ2oeYqA0w6hDte3tEXyIOX5ThV3YrOhlfi1C79KvPs0d mr/Mk3H7Ggv8iKhOPqG7N9t23TNn8Z8P/DeL/Uo0fHbBFv+3e2TmwzV1sDs/j3VIpGucWHr2nHO t1LTtBjLdJgRkaBWEUj6AOJcz6kr X-Received: by 2002:a05:651c:211c:b0:39b:17f0:b16b with SMTP id 38308e7fff4ca-39b24ac1cf9mr12889301fa.16.1782900771082; Wed, 01 Jul 2026 03:12:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nisha Moond Date: Wed, 1 Jul 2026 15:42:38 +0530 X-Gm-Features: AVVi8Ccv7tli_tWwIXej8tARoLR76HKSC029JvzfcIyTXV23bvoTw9Wzpjz6YhU Message-ID: Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications To: shveta malik Cc: Peter Smith , Amit Kapila , Zsolt Parragi , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. Test case: -- Root of the partition tree lives in s2 CREATE TABLE s2.parent (id int) PARTITION BY LIST (id); -- Child partition lives in s1 CREATE TABLE s1.part PARTITION OF s2.parent FOR VALUES IN (1, 2, 3); -- Publication covers BOTH schemas, but EXCEPTs only s2.parent CREATE PUBLICATION p FOR TABLES IN SCHEMA s1, TABLES IN SCHEMA s2 EXCEPT (TABLE s2.parent); Currently, if the root is excluded, all child partitions are also excluded, meaning s1.part is not published. However, s1 never excluded 'part' explicitly, so the behavior may not be intuitive. We need to decide whether child partitions should always remain excluded when the root is excluded (regardless of schema), or whether schema membership should still allow publication. I've added an XXX comment in pg_publication.c to track this until we conclude on the expected behavior. Suggestions are welcome. -- Thanks, Nisha