From: David Steele <david@pgmasters.net>
To: Pg Hackers <pgsql-hackers@postgresql.org>
To: Amit Langote <amitlangote09@gmail.com>
Subject: Views no longer in rangeTabls?
Date: Fri, 9 Jun 2023 11:28:48 +0300
Message-ID: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net> (raw)
Hackers,
While updating pgAudit for PG16 I found the following (from our
perspective) regression.
In prior versions of Postgres, views were listed in rangeTabls when
ExecutorCheckPerms_hook() was called but in PG16 the views are no longer
in this list. The permissions have been broken out into permInfos as of
a61b1f748 and this list does include the view.
It seems the thing to do here would be to scan permInfos instead, which
works fine except that we also need access to rellockmode, which is only
included in rangeTabls. We can add a scan of rangeTabls to get
rellockmode when needed and we might be better off overall since
permInfos will generally have fewer entries. I have not implemented this
yet but it seems like it will work.
From reading the discussion it appears this change to rangeTabls was
intentional, but I wonder if I am missing something. For instance, is
there a better way to get rellockmode when scanning permInfos?
It seems unlikely that we are the only ones using rangeTabls in an
extension, so others might benefit from having an answer to this on list.
Thanks,
-David
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: david@pgmasters.net, amitlangote09@gmail.com
Subject: Re: Views no longer in rangeTabls?
In-Reply-To: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net>
References: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox