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 1wZjlP-001FZR-0e for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jun 2026 06:28:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZjlN-004kjB-2t for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jun 2026 06:28:37 +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 1wZjlN-004kj2-14 for pgsql-hackers@lists.postgresql.org; Wed, 17 Jun 2026 06:28:37 +0000 Received: from mail-pg1-x52b.google.com ([2607:f8b0:4864:20::52b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wZjlL-00000000lOZ-3tWi for pgsql-hackers@lists.postgresql.org; Wed, 17 Jun 2026 06:28:36 +0000 Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-c858d69bde9so2191377a12.1 for ; Tue, 16 Jun 2026 23:28:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781677714; cv=none; d=google.com; s=arc-20240605; b=g95o07Jk3tEJWPidTbPLVibRjlFL0xYn65ZvupIWTMnHVReBGChmXzB6fiMMHjc9bv EgLYnevHMmQFQczcKltRjL6x4Ul1t1TPkjRX3GqSCdWnD9ITn6NfWE/otgoV1e5b1cJZ +QRXB7hExKDYnkTV+W27JAVFcElxoZ5y1U8f4NKAm1BsTz8tKxF52cs50ZeeDDQB9oAM wJuL/naoiSDnhFWpZCS3Xc3vb4NfAl8s9oA3Tb0P97z8k2OxDUPE4wL2DkCfrJ6C5Bzj fuWeOMJblwI/Y2xw43UK+AU9ZIQGlr1Ll7i1BhiWeZvrSA+ssE0VGgX5ER+bUyt3bER5 u4Tw== 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=PVeww8CCweHn2UgZFkKocOHBCK5XCq4AZ7c6F6xKHzU=; fh=VLgGgbMNpHv+styd1BxVJXZOsNHpoq3TT3hF9mTK1xo=; b=a4l80UnYZsQ9grem+yHrpxA2yfHgwwV1p7cNsF6n9rJNWH1HuUHGnBWLJmsND18hAY Rt7nGUFggqUcJj2HNDf0JWOKZSY1FNseMcp/dvv5IcqbWGKSbinBXSSzAqQXbZ5SDnoK Mqh3d+NpGUO5nLkSzSxVNFKKazh9Ah6uM1lyO5eJeM0IRgmeWZFMvOdPA7VSh+e1KYKQ y3grEUhIX+bNgNqPXBDDiuZYD6AuSuFl5s/L84Fq6KrFB0fh582awBKzVqjPCSpcwl7/ XfQnb/wOWC9hrrmPVOhBn0IiQh8k9fWg1rX8aBH1g52gOsu7Gx/Ypm5Z1baKoSuRRZnS fN8A==; 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=1781677714; x=1782282514; 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=PVeww8CCweHn2UgZFkKocOHBCK5XCq4AZ7c6F6xKHzU=; b=rymdNPjdnRCGJoPJrI2jKrkhafJ4nHFzbzlQCIRlYAiVFyaqoPwqpEaSxtxBzbbcdE Ym4EqIpb5agZjUyspJVJbioIXchj6t2drkLRK32wIi9bKhvfGnsiSe7SH9oRr5Znpf/1 Ep6daD8JRZ7vWMPJBwmN4m36E1xGNucedaWU4EaR7hOmBbc3XTsjeFLZN4k+wcS0qWoe +MO6rfgrYjR2P554VirC/0wxTULErKK6hz6irv/bG0HGnNcW6DCordPFpG46N0n5YMPu 2BTmcSNFYS68msb9Jz6cIJ4iXYEoW2RaAgJKwVXjC3tA5m6XbOUoLGWWKSmLViX3yHb0 T0Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781677714; x=1782282514; 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=PVeww8CCweHn2UgZFkKocOHBCK5XCq4AZ7c6F6xKHzU=; b=HRsca1vck+F4VV4fV1q3jaetXAEEIZWTjaGGjrcKPQ0pd1jGUAnvs4uQij3hsKsBC1 G9cATm2BcN8kFnkhNLJ+OCcAWqFkG3yNZSdrsTEpuD5+Un+hYcb6BS3bfVhOlFH04GyA ZUx+GuX8cyqCmaCxh4Unlifl4KE/KGojXyn/eVpa+aBXbLSbMnEnnywgaw3XfWRpT7R/ GrpTek7aFvQrHfVKxwRqv4X2zwIVyuf1HgPoqAtsNaqNXyi75f3nXIcxHlBcH0Q+ecAP 1mbeEih4nNy9S4i7nREIxAZv/NtudzD3JnOVYrYZrVW86zymgM5EXhtEG0lw260id/j9 UcxQ== X-Forwarded-Encrypted: i=1; AFNElJ9f2DoXh8ApMbB/Eo+jOdC5DJ6saaW7P46bDYHuroLfjz6oEaxYrgY5ZjE4Xrj8WN/Ww2OxPsmUxZ2sF4my@lists.postgresql.org X-Gm-Message-State: AOJu0YzJ875Zkavh1WTJPLfNi7zgkqoA5EtdWh+OxE7QhwX9vhtXiAYm WPdSmWTRxY/jlnDjqZPIzqJWkWLLEp81zbeF8sPIMEGeeZ7D/cxLPLFsn7Mg5AoS5b8TIuRBf8G +mNuppBI6wDsNaa5+v5iZ67XaKsZPJAc= X-Gm-Gg: Acq92OEL4o9jP+/glFTRFZrCd70FFu1Q5inbaQEqPxEB4yT74AtRxA22+IwWe7n+iIw q9deVtAA7Xv+YEUQM0N90EkkDZQ0u7vPhjvflsvoJzJPeW2hILhgw/HtbxZMDk1CAKgKY+yTdqQ f3N7CN16+gaj6lzMpLckdsFBjNmWKXxGXMtAHiq1Y86ZpykKDSsuy/HKqAlizEa8NoebXzdet4t OIzYtY7OTyySpkoBl+8DmyWrt42QT7dMM+qBuKiACFtDn8BmJP6nN8YIWqxXcirzb7KWsq164vE HaI/dFQNpH+8FZTGlmibe7PaENFmaEbn2j95G9LylkhMOcWPeP/WMmlOhkLWfZs9M0U4JLljn1r DpngF9O73kcvOG1wTlIOQH+7P9Dtt56Q= X-Received: by 2002:a05:6a21:1643:b0:3b7:8027:dfeb with SMTP id adf61e73a8af0-3b8be3af140mr2905395637.22.1781677714300; Tue, 16 Jun 2026 23:28:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Wed, 17 Jun 2026 11:58:22 +0530 X-Gm-Features: AVVi8Cd-eZ-nE9a_gF6l2dEw-jBtyGVBWxPhR_75jvoEdAJCjX6GlRTOds3938Y Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: vignesh C , shveta malik , Nisha Moond , Peter Smith , Masahiko Sawada , 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 Tue, Jun 16, 2026 at 4:12=E2=80=AFPM Dilip Kumar = wrote: > > o ensure we are aligned, I want to clarify the current behavior before > we decide on the next steps. Currently, view and function creation are > both permitted for toast and conflict tables. However, there is a > discrepancy in the schemas: view creation is blocked in the > 'pg_conflict' and 'pg_toast' schemas, while function creation is > allowed in both. So IIUC we need to take a call whether the function > creation should be blocked in pg_conflict schema or not, logically we > can say it can be blocked but we might need to discuss on this because > it's allowed in the `pg_toast` schema. And if we are worried about > the descripency that functions are allowed in this schema but views > are not, I don't think we need to worry about this, this is an > existing behaviour for toast also and if we want to can investigate as > a separate thread and fix it for system schema al together? Am I > missing something here? > > postgres[2205601]=3D# CREATE VIEW v2 AS select * from pg_toast.pg_toast_1= 6412; > CREATE VIEW > > postgres[2205601]=3D# CREATE VIEW v3 AS select * from > pg_conflict.pg_conflict_log_16406; > CREATE VIEW > > CREATE VIEW pg_toast.v5 AS select * from pg_toast.pg_toast_16412; > ERROR: 42501: permission denied to create "pg_toast.v5" > DETAIL: System catalog modifications are currently disallowed. > LOCATION: heap_create, heap.c:322 > > postgres[2205601]=3D# CREATE VIEW pg_conflict.v5 AS select * from > pg_conflict.pg_conflict_log_16406; > ERROR: 42501: permission denied to create "pg_conflict.v5" > DETAIL: Conflict schema modifications are currently disallowed. > LOCATION: heap_create, heap.c:329 > The one case which is not shared is allow_system_table_mods =3D on mode where I think the view is allowed to create in pg_toast but not in pg_conflict schema. > postgres[2205601]=3D# CREATE FUNCTION pg_conflict.get_conflict_count() > RETURNS bigint > LANGUAGE sql > AS $$ > SELECT count(*) FROM pg_conflict.pg_conflict_log_16406; > $$; > CREATE FUNCTION > > postgres[2205601]=3D# CREATE FUNCTION pg_toast.get_toast_count() > RETURNS bigint > LANGUAGE sql > AS $$ > SELECT count(*) FROM pg_toast.pg_toast_16412; > $$; > CREATE FUNCTION > I think we should allow both functions and views in non-pg_conflict schema and disallow both in pg_conflict schema. This is because there is no use case of allowing user objects in pg_conflict schema (even with allow_system_table_mods) and we have deliberately kept it closed for user objects. The one minor advantage in keeping closed for user objects is that we can avoid the risk of name collisions in pg_conflict schema. Will this address questions/concerns raised on this topic? --=20 With Regards, Amit Kapila.