pgsql: Optimize nested ConvertRowtypeExpr nodes.

From: Andrew Gierth <rhodiumtoad(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Optimize nested ConvertRowtypeExpr nodes.
Date: 2018-11-06 21:14:26
Message-ID: E1gK8g6-000246-R6@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Optimize nested ConvertRowtypeExpr nodes.

A ConvertRowtypeExpr is used to translate a whole-row reference of a
child to that of a parent. The planner produces nested
ConvertRowtypeExpr while translating whole-row reference of a leaf
partition in a multi-level partition hierarchy. Executor then
translates the whole-row reference from the leaf partition into all
the intermediate parent's whole-row references before arriving at the
final whole-row reference. It could instead translate the whole-row
reference from the leaf partition directly to the top-most parent's
whole-row reference skipping any intermediate translations.

Ashutosh Bapat, with tests by Kyotaro Horiguchi and some
editorialization by me. Reviewed by Andres Freund, Pavel Stehule,
Kyotaro Horiguchi, Dmitry Dolgov, Tom Lane.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5613da4cc7910f4b686b818dd1ee68703d62192f

Modified Files
--------------
src/backend/optimizer/util/clauses.c | 46 +++++++++++++++++++++++++++++++++++
src/test/regress/expected/inherit.out | 18 ++++++++++++++
src/test/regress/sql/inherit.sql | 5 ++++
3 files changed, 69 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2018-11-06 22:32:21 Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
Previous Message Thomas Munro 2018-11-06 21:01:53 pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.