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-12-05 23:17:49
Message-ID: 24902.1575587869@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I haven't tried to code this yet, but will go do so if there aren't
> objections to this sketch.

OK, so here's a finished set of patches for this issue.

0001 is the same patch I posted on Tuesday; I kept it separate just
because it seemed like a largely separable set of changes. (Note that
the undesirable regression test output changes are undone by 0002.)

0002 implements the map-vars-back-to-the-inheritance parent change
per my sketch. Notice that relation aliases and Var names change
underneath Appends/MergeAppends, but Vars above one are (mostly)
printed the same as before. On the whole I think this is a good
set of test output changes, reflecting a more predictable approach
to assigning aliases to inheritance children. But somebody else
might see it differently I suppose.

Finally, 0003 is the remaining portion of David's patch to allow
deletion of all of an Append/MergeAppend's sub-plans during
executor startup pruning.

Thoughts? I'd like to push this fairly soon, rather than waiting
for the next commitfest, because otherwise maintaining the
regression test diffs is likely to be painful.

regards, tom lane

Attachment Content-Type Size
0001-make-ruleutils-deal-in-plans-not-planstates.patch text/x-diff 31.9 KB
0002-map-vars-to-inheritance-parents.patch text/x-diff 321.6 KB
0003-improve_runtime_pruning_explain_output_v4.patch text/x-diff 15.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-12-05 23:34:37 Re: Corruption with duplicate primary key
Previous Message Alvaro Herrera 2019-12-05 23:15:50 Re: log bind parameter values on error