Re: Runtime pruning problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Runtime pruning problem
Date
Msg-id 7814.1564527032@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  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> On Wed, 31 Jul 2019 at 10:27, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What I had in mind was to revert 1cc29fe7c's ruleutils changes
>> entirely, so that ruleutils deals only in Plans not PlanStates.
>> Perhaps we've grown some code since then that really needs the
>> PlanStates, but what is that, and could we do it some other way?
>> I'm not thrilled with passing both of these around, especially
>> if the PlanState sometimes isn't there, meaning that no code in
>> ruleutils could safely assume it's there anyway.

> Are you not worried about the confusion that run-time pruning might
> cause if we always show the Vars from the first Append/MergeAppend
> plan node, even though the corresponding executor node might have been
> pruned?

The upper-level Vars should ideally be labeled with the append parent
rel's name anyway, no?  I think it's likely *more* confusing if those
Vars change appearance depending on which partitions get pruned or not.

This may be arguing for a change in ruleutils' existing behavior,
not sure.  But when dealing with traditional-style inheritance,
I've always thought that Vars above the Append were referring to
the parent rel in its capacity as the parent, not in its capacity
as the first child.  With new-style partitioning drawing a clear
distinction between the parent and all its children, it's easier
to understand the difference.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Daniel Migowski
Date:
Subject: Re: Adding column "mem_usage" to view pg_prepared_statements
Next
From: Tom Lane
Date:
Subject: Re: Runtime pruning problem