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 1wZLQv-000xpm-2F for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jun 2026 04:29: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 1wZLQu-00F5oG-1p for pgsql-hackers@arkaria.postgresql.org; Tue, 16 Jun 2026 04:29:52 +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 1wZLQu-00F5o4-08 for pgsql-hackers@lists.postgresql.org; Tue, 16 Jun 2026 04:29:52 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wZLQs-00000000aWm-2nBk for pgsql-hackers@lists.postgresql.org; Tue, 16 Jun 2026 04:29:51 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-5aa7a7c9711so4562045e87.0 for ; Mon, 15 Jun 2026 21:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781584189; cv=none; d=google.com; s=arc-20240605; b=C7S+Eg/hiU+KEXzlKQEPBTd3OCZchlCob/utWWQKLmHGWjawv6I9x7A7Hao5hIAz/n jz3798dAS1nqvI3U5DtQcFRifvvf+95uztRnJx6AhkBJAWGJPjwcWZ+TkDoUxmBoVmDB SN+25menF/elyiGs9AAU/NszDvzq0n7sufeZRg7YdWewpW8AlSzj7cOMriQ6pS+S0p70 LuUTXcb+kdwg2zwbxH51ziYpyQ+wb6Q9My1B8kyRwshnEcLSj1a1AifhEazFGeIEZPMO dsE2JQFgRjzOxrr8f0ESUbBouccfod2t4ROVVcHzWibNWW2jsBxJ5WSUaU+TUZK/vmJ7 H2Cg== 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=zF59LyoXYPR7U+pMIyQavVIs9smIrgp718a5dWYiEYY=; fh=n3K/oMffD8+p6+E4ZZ5mQv1tzhjJSJwvLX5Ze5rnoDw=; b=Ef068ziOm2lcEX1yRLipqlytE4wI7gMhJQzCfPRkHxnWR0cipov5+Rt9JFtdhefNo+ 0tfpPyqD3+pkYtrs0STBycvngPq9+fnoSdcH48MbdJDEpur+GyKJdjOBa1vWDnPdPOVM Xei5kRKuKh8QTytcpSkJ70169Z9icKiVYJrqY8EMTRN0XeSHNZyL5RhE617Vb62MPFCH toMiusVAXVdj78bAvYs0ZlOQDFZHY2HycB/zl6G0lW2uSz8SnuKCJ7f6UkydG/WzMYF1 UPEvF6v6p4BNpUfo2/wtHWj+LXLlZYFpncV04WMN78Y3yJBXlRZpF8ldjbf2FJHp9Iqx Yf2A==; 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=1781584189; x=1782188989; 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=zF59LyoXYPR7U+pMIyQavVIs9smIrgp718a5dWYiEYY=; b=s5D1TyXdL58anKzdGWBBddyYjp2n7kiMm4YwnSsDC9umZa86xijvErWqkAxBQbthK9 ag2LQu5pHFuan6a3XRM/bIVDNmmYqix4egGXm+CAnroZkP/+X6bJOjt/BEorXflIWeh9 3ZYfP514JRlFPdGTTHoLy5/L5zoCx0UScERkGYZwUUkmXXVK/3v9t86J4XNdMFb6sK9u 9hAsKidEnIKUMv8b9ybaFZRAQ4g+axCG866CbmibOW/aKvkkLtoBYzA9kSm1U4OoqNWw bsVZRINDAEau1vBaQv1fE+5MPkMpKMXfANV90hJZjjiFk3C4mGY4SxAgZmUdAYubudYD LCnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781584189; x=1782188989; 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=zF59LyoXYPR7U+pMIyQavVIs9smIrgp718a5dWYiEYY=; b=jyj+TouD2kutd/xbbndJ6J+g2uIEKUVE6zQJGAa/C1vV0Q77xvfa+CRaWWDBFkB+OV 90T/H6PQm+dMutKVw+hFjMWCAD+vo7uJSpINsp03raRdSW/Z7azH/qEsyy7UPFmvWVHO riunUTvvNGl8zvD5epF+p+Wfc0atHSToXi4ZSZraAAMKbTzzhCW9a0zq6cFm2DBv9Wcp KIy9s/4gZz0p38gUpLzX8p4EaR5EJ4fcaZN92/Q24DjGZdT+Z1CHPoz5pckmI79rZ3qK y+i0IvMb/yYx8bIPmHGyH+4zopNRAQVVPWiR8TI9DwyiP5uyupvYL52mMGd2z2l0Bgle 1vMg== X-Forwarded-Encrypted: i=1; AFNElJ9pu09sbXeJ8s55DweKFlDagmB9EeHVuE8LjzUMeQHTtuSOZtzACmddR9NAEMXbtP/Hlkt1Zu5hoFgJnMvz@lists.postgresql.org X-Gm-Message-State: AOJu0YwjLmgDMreQ5YM+vu/l41/ZbnAJmLPlF61XsqhyHcNDg+Qtqii3 VWIQ1hke/e3mnjy7pfNVTnYH9niU1oLGIDwegFKumw4eNH2XmJyza7U6msY5E0VyQ7dkrvH4AP1 AKvleQXEswreABOCj5NwVXdf0N+ZP3IQ= X-Gm-Gg: Acq92OEgYH0KnVsTDKSSc8q9Qmf8eRLyJPO2f9Mx0H9YDS/sjlbIrcXzBm4+Qw8JE2j 9hK7OwmgfB0tibsr7znK+IIO+Zk49auRjA+NiToPnuqUGl4Bl0nfyUUoufCYmDBlORunnqMiUPi KbQJ31OqJThkW4TsXhhw1mYAvqCnUxW9teLYzy/6e2cQ0E++TkI2dWS0oiKUZxW9zrZuRy/IXQm 8zgJU6jd910tg3CdLgdxFeGpL+YQIwVz5ACaqbt3UnNo51w7dLxs0TOSW5uxSpuBxmALplvmUNh prjsWDapvjycmNlbXwiPJ4DxeYECBpTou6c3fsRMNxnM5LSZpxPFtQ== X-Received: by 2002:a05:6512:154b:20b0:5a8:dc4e:477a with SMTP id 2adb3069b0e04-5ad42a28ecfmr394068e87.8.1781584188541; Mon, 15 Jun 2026 21:29:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Tue, 16 Jun 2026 09:59:32 +0530 X-Gm-Features: AVVi8CddFZ_9PqNIT3f8cQVpmHA69ZfdEqjJCrp3D79bgSKRYZe3v-3JEayHpaw Message-ID: Subject: Re: Proposal: Conflict log history table for Logical Replication To: Dilip Kumar Cc: vignesh C , Amit Kapila , 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 Tue, Jun 16, 2026 at 9:56=E2=80=AFAM Dilip Kumar = wrote: > > On Tue, Jun 16, 2026 at 9:27=E2=80=AFAM vignesh C w= rote: > > > > On Mon, 15 Jun 2026 at 14:20, Amit Kapila wro= te: > > > > > > > 2. Views are disallowed, but functions are allowed > > > > Creating a view in the pg_conflict schema is rejected: > > > > postgres=3D# CREATE VIEW v1 AS > > > > SELECT * FROM pg_conflict.pg_conflict_log_16435; > > > > ERROR: permission denied to create "pg_conflict.v1" > > > > DETAIL: Conflict schema modifications are currently disallowed. > > > > > > > > However, creating a function in the same schema succeeds: > > > > CREATE FUNCTION pg_conflict.get_conflict_count() > > > > RETURNS bigint > > > > LANGUAGE sql > > > > AS $$ > > > > SELECT count(*) FROM pg_conflict.pg_conflict_log_16404; > > > > $$; > > > > CREATE FUNCTION > > > > > > > > > > This is okay because the function is doing SELECT which we allow on > > > these tables. > > > > Shouldn=E2=80=99t creating a view also be allowed for the same reason? > > > > The function is permitted because it only performs a SELECT on the > > conflict log table, and such read operations are allowed. A view > > likewise represents a stored query definition and does not modify the > > conflict schema or its underlying tables. Given that direct queries on > > the conflict log tables are already permitted, allowing users to > > define views over them is consistent with the same rationale applied > > to functions. > > Whats is the behavior of toast table w.r.t the function vs view? > Please see [1] for details. [1]: https://www.postgresql.org/message-id/CAJpy0uDoa0CYWkxj52h%3DRM53acfsq= jRihCfKrm8W%3DvRvHg01UA%40mail.gmail.com thanks Shveta