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 1wa3u0-001VLI-2N for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2026 03:58:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wa3ty-009Cpn-2V for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jun 2026 03:58:50 +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 1wa3ty-009Cpd-0c for pgsql-hackers@lists.postgresql.org; Thu, 18 Jun 2026 03:58:50 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wa3tw-00000000uUL-1s9t for pgsql-hackers@lists.postgresql.org; Thu, 18 Jun 2026 03:58:49 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-84538597e1fso211799b3a.1 for ; Wed, 17 Jun 2026 20:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781755127; cv=none; d=google.com; s=arc-20240605; b=DTv/ShSaoMHcodylQrH5S/FyIoZAeP+dbKcTLdsMLrq4mkfBg5UyNDD7Q07n/Q/eBq QTuNZ1vxtVGY0ahIL0lKacHxXnwYkpwdXg0ew6yWRcN43QTwiA2WzhUydUCdEtU4D2Ex 4z6LlYyJzG/G3xAl1efznoKx6BdvmIF6at2o29BUvZBnzEnpt1kzD06Bt/+YYM3/8J/8 jpvKqnjdpiEMXS8o5DErr7ao7Y+EuXR7NgVaa91f81TW6VR1RDGwak07pKtrv07g97Oe fkQvabEZuU99F3dWOnMboHNsJ99vRsUgGy/AP+Kjsc9xO0DEHFDYsHwD6rSN65edU2Rp OaXg== 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=8QyNHqJBW3piJj/ArGgQ1qIntH6AwzV+hYqjctwbpoA=; fh=P9S2faznKHi5HvL1erQ3+j90UK0edre4ra6rHzMxAwY=; b=jnX85NczEiK/J4RYcg83NeZpjeWXVI6LQYm52hD0sN/JJ0DdgMIxBoHrupkYXWNjyn rA+uVo0r9g3e/Kse+l9ZqDFx6SY4WS3C8zguHVqi1NIsFL0j8W3s0N0XQe1jJqMY+fGb idhTqBN75TZAqMVgR6HDfjtl0Ujlxu7ogfoWhgcA0guMVyXJI9QOi+IAdFho8w1BO8rm gp5VwDBo322NhybZiPwQm9tj+akwdi+zma6K4tPKKtXLe4Ohdsz5GzZcMMgnDFRPKPAI yKJgOwkKTuGRTmK9sulS8XgjOgowaQuz0y6eKh52mvVXq+sz9ATKt13uX+Rw/Sp009zo B2sA==; 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=1781755127; x=1782359927; 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=8QyNHqJBW3piJj/ArGgQ1qIntH6AwzV+hYqjctwbpoA=; b=GDCDS3IuP7hnII5KY369dGNWTfySB+QOzUp6bzGcxOOWp8lWCu1CefrCiwIafegXjJ jWt50mQ2NAdjQClAWOqtoboOuQWvTEo45cKJMKwaCkcAyCbwFJEvUEgIaDoKyEfWroFp SP2LBpSRO+Of8CkCzEmHaR3udEQaWDEwjt13IYMk6l24JE5lBOqu5K/GuGbe5g0FCTaJ OX6tj9Rau+vgb9H9HqbLWHMZxLVewG7FQculFQSBY+RCQIJV9Dht9B4cxhLJAZH8rP13 WgMFopHSUbbUa6DT50FA5BHfPtey167GRJvSzxSkAK86hOt6T7RYq0exUoUm1GbgQEXL ux3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781755127; x=1782359927; 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=8QyNHqJBW3piJj/ArGgQ1qIntH6AwzV+hYqjctwbpoA=; b=bp4F7SJamuaSW8ZqikBK6xiHXkuHDchtT/QH3Rd3rh90EB1Bi2kOD9e5HENWg+nZXp QjzjHFizTKS7AKiIWRGlcr+EbmqTlmfSAlJi5Gv5uZMVLV5WGNhSHfj7b1bKe66YfARh AtWkCGFUVax1aJgwSXmrZfmx/yU0+GtPldDj/NK1/e+3lL45ZNfBVkaaWDU+RrU+VXdC yosnnEOv6X1bGSjnhJe8Ig1tTKcUS+WxRj3P0oAmeKy3/QdWReebAK36qnygVnJ5tgdy TUXpaPpljqv8gCDJiE/AGLyIglrtq7FVa5aK9aq47Z99y5YFq3XDgwpTHL3BoAZMo0Ly Q6gQ== X-Forwarded-Encrypted: i=1; AFNElJ/AphXIhC7GxDEBG6Xdb9c14rxOk/y+dm+4e923/vSxsqU4BG5KL+gwOLh6MyfFTNkxBPDDaiNR2NEUMH6X@lists.postgresql.org X-Gm-Message-State: AOJu0YzWBiTKnQpdvcDT2wqg7mIdMSR1unQT6HMpPrzT5VGkC14FOFzZ OStZJHqUK2JQrHQqiUHm8KollTGDGdQlExG2AvphNvOHZ4manWrE7f0AvpX3K8pyeP94CX6wpkl 3mEpkON9UXnS5595mJM5ViNsHbM+KvUQ= X-Gm-Gg: Acq92OHqF7CPLGu5jj5RnMuhwcZkFAG24N8QDddjYNt1fOogkbFtAZrR0N/vjJw+MQu bhNvSBBu9/iOBGAkIOUFJ9y3sB1/Qde/0KllbVun2bCEm9YQRODcz6lHMrG1O5kgAI8A6cUBegI swSYG30PhwKMvhs3FH0h+vD51S4Rykqit0RR2S/cfM+d7PHNWctlhAYeZaz7LqUnZa7xeYNTXUF ksdc+xmLvLZsJF70nMgQ5iQlEraXXAaCwy59tYATLUvmMy7InZyLgJba4xEhDAAISNvdyeF3WIk 1oJJBTY2hnNgZkNrnQ9DFfxkWD7UKki5N9GMlj1HNw== X-Received: by 2002:a05:6a00:428a:b0:841:edbf:6424 with SMTP id d2e1a72fcca58-84524480840mr7171126b3a.13.1781755127046; Wed, 17 Jun 2026 20:58:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Thu, 18 Jun 2026 09:28:35 +0530 X-Gm-Features: AVVi8CfwpsPxAIKBs7mXP2_MPABsNXQNqFPlcyxHI4mZ9nMUh7RINLYem5TXEKE Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Amit Kapila Cc: Dilip Kumar , vignesh C , Nisha Moond , Peter Smith , Masahiko Sawada , Bharath Rupireddy , PostgreSQL Hackers , 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 Wed, Jun 17, 2026 at 11:58=E2=80=AFAM Amit Kapila wrote: > > 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= _16412; > > 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. yeah, I shared this point earlier in [1]. I guess it's missed. > > > 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? I have the same opinion. Also I raised the same question about table names. The behaviour should be conssitent for tables, views. Please see my responses in [1]. Also see my comment #2 in [2] for table-creation inside CLT. [1]: https://www.postgresql.org/message-id/CAJpy0uDoa0CYWkxj52h%3DRM53acfsq= jRihCfKrm8W%3DvRvHg01UA%40mail.gmail.com [2]: https://www.postgresql.org/message-id/CAJpy0uCoVPRvaAwgDz1EZww1PqHUd4B= %3DS%2BF1Dh2F9kxKMpvJEw%40mail.gmail.com thanks Shveta