Re: pgsql: Support partition pruning at execution time - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgsql: Support partition pruning at execution time
Date
Msg-id CA+TgmoZzQ03jJjBNfGn3DGtpTo=VfrYa3wOHCjSbw9Hz39qs6Q@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Support partition pruning at execution time  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: pgsql: Support partition pruning at execution time  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Tue, Apr 10, 2018 at 11:14 AM, Alvaro Herrera
<alvherre@alvh.no-ip.org> wrote:
> Questions:
> 1. Do we want to back-patch this to 10?  I suppose (without checking)
> that EXPLAIN ANALYZE is already reporting bogus numbers for parallel
> index-only scans, so I think we should do that.

I haven't looked at this closely, but have you considered adding
bespoke code for IndexOnlyScan that works like
ExecSortRetrieveInstrumentation and ExecHashRetrieveInstrumentation
already do rather than jamming this into struct Instrumentation?

I'm inclined to view any node-specific instrumentation that's not
being pulled back to the leader as a rough edge to be filed down when
it bothers somebody more than an outright bug, but perhaps that is an
unduly lenient view.  Still, if we take the view that it's an outright
bug, I suspect we find that there may be at least a few more of those.
I was pretty much oblivious to this problem during the initial
parallel query development and mistakenly assumed that bringing over
struct Instrumentation was good enough.  It emerged late in the game
that this wasn't really the case, but holding up the whole feature
because some nodes might have details not reported on a per-worker
basis didn't really seem to make sense.  Whether that was the right
call is obviously arguable.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: pgsql: Support partition pruning at execution time
Next
From: Teodor Sigaev
Date:
Subject: Re: WIP: Covering + unique indexes.