Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7XUP-0007qj-GA for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 08:28:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7XUN-0000XF-J5 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 08:28:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7XUN-0000V5-8b for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 08:28:55 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q7XUK-001BIN-Qq for pgsql-hackers@postgresql.org; Fri, 09 Jun 2023 08:28:54 +0000 Received: from [10.5.0.2] (unknown [217.138.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id A680354669; Fri, 9 Jun 2023 08:28:50 +0000 (UTC) Message-ID: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net> Date: Fri, 9 Jun 2023 11:28:48 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Content-Language: en-US To: Pg Hackers , Amit Langote From: David Steele Subject: Views no longer in rangeTabls? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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