pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Allow left join removals and unique joins on partitioned tables
Date: Mon, 09 Jan 2023 04:16:31 +0000
Message-ID: <E1pEjaJ-002kfC-I5@gemulon.postgresql.org> (raw)

Allow left join removals and unique joins on partitioned tables

This allows left join removals and unique joins to work with partitioned
tables.  The planner just lacked sufficient proofs that a given join
would not cause any row duplication.  Unique indexes currently serve as
that proof, so have get_relation_info() populate the indexlist for
partitioned tables too.

Author: Arne Roland
Reviewed-by: Alvaro Herrera, Zhihong Yu, Amit Langote, David Rowley
Discussion: https://postgr.es/m/c3b2408b7a39433b8230bbcd02e9f302@index.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3c569049b7b502bb4952483d19ce622ff0af5fd6

Modified Files
--------------
src/backend/optimizer/util/plancat.c         | 264 +++++++++++++++------------
src/backend/utils/adt/selfuncs.c             |   4 +
src/include/nodes/pathnodes.h                |  10 +-
src/test/regress/expected/join.out           |  10 +
src/test/regress/expected/partition_join.out |   4 +-
src/test/regress/sql/join.sql                |   7 +
src/test/regress/sql/partition_join.sql      |   4 +-
7 files changed, 179 insertions(+), 124 deletions(-)



Message-ID: <E1pEjaJ-002kfC-I5@gemulon.postgresql.org>
Permalink:  ../E1pEjaJ-002kfC-I5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pEjaJ-002kfC-I5@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: drowley@postgresql.org
  Subject: Re: pgsql: Allow left join removals and unique joins on partitioned tables
  In-Reply-To: <E1pEjaJ-002kfC-I5@gemulon.postgresql.org>
  References: <E1pEjaJ-002kfC-I5@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox