Re: Runtime pruning problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Runtime pruning problem
Date
Msg-id 9479.1564529470@sss.pgh.pa.us
Whole thread Raw
In response to Re: Runtime pruning problem  (David Rowley <david.rowley@2ndquadrant.com>)
Responses Re: Runtime pruning problem  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> On Wed, 31 Jul 2019 at 10:56, Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Runtime pruning problem
Next
From: Peter Geoghegan
Date:
Subject: Re: pgbench - implement strict TPC-B benchmark