Re: ExecRTCheckPerms() and many prunable partitions

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Amit Langote <amitlangote09(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ExecRTCheckPerms() and many prunable partitions
Date: 2021-06-30 14:33:46
Message-ID: CAApHDvrU9Hp2AbVM0vKgOcaNgpDQQgKyYu8DPvFD3hBQGC5g+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 1 Jul 2021 at 01:34, Amit Langote <amitlangote09(at)gmail(dot)com> wrote:
> For now, I have implemented the idea 2 as the attached patch.

I only just had a fleeting glance at the patch. Aren't you
accidentally missing the 0th RTE here?

+ while ((rti = bms_next_member(checkPermRels, rti)) > 0)
{
- RangeTblEntry *rte = (RangeTblEntry *) lfirst(l);
+ RangeTblEntry *rte = (RangeTblEntry *) list_nth(rangeTable, rti - 1);

I'd have expected >= 0 rather than > 0.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Pyhalov 2021-06-30 14:33:50 Re: Partitioned index can be not dumped
Previous Message Bharath Rupireddy 2021-06-30 14:31:55 Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values?