Re: Runtime pruning problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Yuzuko Hosoya <hosoya(dot)yuzuko(at)lab(dot)ntt(dot)co(dot)jp>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Runtime pruning problem
Date: 2019-07-30 23:31:10
Message-ID: 9479.1564529470@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:
> On Wed, 31 Jul 2019 at 10:56, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> The portion of this below the Append is fine, but I argue that
>> the Vars above the Append should say "part", not "part_p1".
>> In that way they'd look the same regardless of which partitions
>> have been pruned or not.

> That seems perfectly reasonable for Append / MergeAppend that are for
> scanning partitioned tables. What do you propose we do for inheritance
> and UNION ALLs?

For inheritance, I don't believe there would be any change, precisely
because we've historically used the parent rel as reference.

For setops we've traditionally used the left input as reference.
Maybe we could do better, but I'm not very sure how, since SQL
doesn't actually provide any explicit names for the setop result.
Making up a name with no basis in the query probably isn't an
improvement, or at least not enough of one to justify a change.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-07-30 23:31:54 Re: pgbench - implement strict TPC-B benchmark
Previous Message David Rowley 2019-07-30 23:14:29 Re: Runtime pruning problem