pgsql: Update Append's idea of first_partial_plan

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Update Append's idea of first_partial_plan
Date: 2018-04-17 19:26:13
Message-ID: E1f8WF3-0005WR-9L@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Update Append's idea of first_partial_plan

It turns out that after runtime partition pruning, Append's
first_partial_plan does not accurately represent partial plans to run,
if any of those got pruned. This could limit participation of workers
in some partial subplans, if other subplans got pruned. Fix it by
keeping an index of the first valid partial subplan in the state node,
determined at execnode Init time.

Author: David Rowley, with cosmetic changes by me.
Discussion: https://postgr.es/m/CAKJS1f8o2Yd=rOP=Et3A0FWgF+gSAOkFSU6eNhnGzTPV7nN8sQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b7e2cbc5b49fbab5bc286b9e4cd4062a6703e7a7

Modified Files
--------------
src/backend/executor/nodeAppend.c | 24 +++++++++++++++++-------
src/include/nodes/execnodes.h | 2 ++
2 files changed, 19 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-04-17 19:26:49 Re: pgsql: Support partition pruning at execution time
Previous Message Heikki Linnakangas 2018-04-17 15:57:14 pgsql: Fix a few typos in comments and variable names.