Re: pgsql: Support partition pruning at execution time

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Support partition pruning at execution time
Date: 2018-04-10 03:37:31
Message-ID: CAKJS1f-FUnvjTqwf_8UvtvhRMeK6DRtS1OKqzPtq+M66aY9Y9g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 10 April 2018 at 09:58, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> I then noticed that support for nfiltered3 was incomplete; hence 0001.
> (I then noticed that nfiltered3 was added for MERGE. It looks wrong to
> me.)
>
> Frankly, I don't like this. I would rather have an instrument->ntuples2
> rather than these "divide this by nloops, sometimes" schizoid counters.
> This is already being misused by ON CONFLICT (see "other_path" in
> show_modifytable_info). But it seems like a correct fix would require
> more code.

+1 for a new field for this and making ON CONFLICT use it.

ntuples2 seems fine. If we make it too specific then we'll end up with
lots more than we need.

I don't think re-using the filter counters are very good when it's not
for filtering.

MERGE was probably just following the example made by ON CONFLICT.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2018-04-10 07:24:35 Re: pgsql: Store 2PC GID in commit/abort WAL recs for logical decoding
Previous Message Michael Paquier 2018-04-10 02:59:43 Re: pgsql: Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers.

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-04-10 03:49:50 Re: [sqlsmith] Failed assertion on pfree() via perform_pruning_combine_step
Previous Message Michael Paquier 2018-04-10 03:00:54 Re: Warnings and uninitialized variables in TAP tests