Re: BUG #15251: query plan affected by grant select on partition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsqlpl(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15251: query plan affected by grant select on partition
Date: 2018-07-10 22:47:48
Message-ID: 4683.1531262868@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?utf-8?q?PG_Bug_reporting_form?= <noreply(at)postgresql(dot)org> writes:
> Plan of SELECT query on a parent table, which actually get data from an
> inherited table (partition) depends on grants for a partition.
> - When current_user is missing a grant to SELECT from a partition then
> planner incorrectly decides to use BitmapAnd on two GIN Indexes (see "Bad
> plan" below).

Yeah, I concur this is a bug; two bugs really. See analysis at

https://www.postgresql.org/message-id/3876.1531261875@sss.pgh.pa.us

It's not clear at this point whether it'll be practical to fix in
released branches, but we'll try to do something about it going forward.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-07-11 06:27:13 Re: Problem with tupdesc in jsonb_to_recordset
Previous Message Tom Lane 2018-07-10 20:59:33 Re: Fwd: Problem with a "complex" upsert