=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.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