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 1q7Y3L-0000jo-IH for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 09:05:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q7Y3K-00012K-FL for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Jun 2023 09:05:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q7Y3K-00011w-5e for pgsql-hackers@lists.postgresql.org; Fri, 09 Jun 2023 09:05:02 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q7Y3H-0013F4-9e for pgsql-hackers@postgresql.org; Fri, 09 Jun 2023 09:05:00 +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 DBDDE54679; Fri, 9 Jun 2023 09:04:57 +0000 (UTC) Message-ID: <3c810344-94b3-19a6-26d0-e6350a0b811f@pgmasters.net> Date: Fri, 9 Jun 2023 12:04:55 +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 Subject: Re: Views no longer in rangeTabls? Content-Language: en-US From: David Steele To: Pg Hackers , Amit Langote References: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net> In-Reply-To: <3953179e-9540-e5d1-a743-4bef368785b0@pgmasters.net> 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 On 6/9/23 11:28, David Steele wrote: > > 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. I implemented this and it does work, but it was not as straight forward as I would have liked. To make the relationship from RTEPermissionInfo back to RangeTblEntry I was forced to generate my own perminfoindex. This was not hard to do but seems a bit fragile. Perhaps we need an rteindex in RTEPermissionInfo? This would also avoid the need to scan rangeTabls. Regards, -David