Re: ExecRTCheckPerms() and many prunable partitions

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ExecRTCheckPerms() and many prunable partitions
Date: 2022-03-23 21:02:10
Message-ID: CALNJ-vRncAz9ogAAXxCT6x53jZ4Kgjax3F6vn_G=g8KJJ0sO7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 23, 2022 at 12:03 AM Amit Langote <amitlangote09(at)gmail(dot)com>
wrote:

> On Mon, Mar 14, 2022 at 4:36 PM Amit Langote <amitlangote09(at)gmail(dot)com>
> wrote:
> > Also needed fixes when rebasing.
>
> Needed another rebase.
>
> As the changes being made with the patch are non-trivial and the patch
> hasn't been reviewed very significantly since Alvaro's comments back
> in Sept 2021 which I've since addressed, I'm thinking of pushing this
> one into the version 16 dev cycle.
>
> --
> Amit Langote
> EDB: http://www.enterprisedb.com

Hi,
For patch 1:

bq. makes permissions-checking needlessly expensive when many inheritance
children are added to the range range

'range' is repeated in the above sentence.

+ExecCheckOneRelPerms(RelPermissionInfo *perminfo)

Since RelPermissionInfo is for one relation, I think the 'One' in func name
can be dropped.

+ else /* this isn't a child result rel */
+ resultRelInfo->ri_RootToChildMap = NULL;
...
+ resultRelInfo->ri_RootToChildMapValid = true;

Should the assignment of true value be moved into the if block (in the else
block, ri_RootToChildMap is assigned NULL) ?

+ /* Looks like the RTE doesn't, so try to find it the hard way. */

doesn't -> doesn't know

Cheers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2022-03-23 21:02:48 Re: Removing more vacuumlazy.c special cases, relfrozenxid optimizations
Previous Message Justin Pryzby 2022-03-23 21:01:47 Re: Adding CI to our tree