pgsql: Avoid unnecessary single-child Append nodes.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid unnecessary single-child Append nodes.
Date: 2017-08-15 13:39:47
Message-ID: E1dhc4R-00088T-EF@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid unnecessary single-child Append nodes.

Before commit d3cc37f1d801a6b5cad9bf179274a8, an inheritance parent
whose only children were temp tables of other sessions would end up
as a simple scan of the parent; but with that commit, we end up with
an Append node, per a report from Ashutosh Bapat. Tweak the logic
so that we go back to the old way, and update the function header
comment for partitioning while we're at it.

Ashutosh Bapat, reviewed by Amit Langote and adjusted by me.

Discussion: http://postgr.es/m/CAFjFpReWJr1yTkHU=OqiMBmcYCMoSW3VPR39RBuQ_ovwDFBT5Q@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/prep/prepunion.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-08-15 14:18:43 pgsql: Fix whitespace
Previous Message Robert Haas 2017-08-15 13:04:52 pgsql: Add missing call to ExecReScanGatherMerge.