From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix some planner issues with degenerate outer join clauses.
Date: Sun, 02 Aug 2015 00:58:04 +0000
Message-ID: <E1ZLhbI-0006WA-T4@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix some planner issues with degenerate outer join clauses.
An outer join clause that didn't actually reference the RHS (perhaps only
after constant-folding) could confuse the join order enforcement logic,
leading to wrong query results. Also, nested occurrences of such things
could trigger an Assertion that on reflection seems incorrect.
Per fuzz testing by Andreas Seltenreich. The practical use of such cases
seems thin enough that it's not too surprising we've not heard field
reports about it.
This has been broken for a long time, so back-patch to all active branches.
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/7968238eb17ed5f2f1123271549b7921fa1d3aba
Modified Files
--------------
src/backend/optimizer/path/joinrels.c | 26 ++++---
src/backend/optimizer/plan/initsplan.c | 18 ++++-
src/test/regress/expected/join.out | 129 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql | 50 +++++++++++++
4 files changed, 211 insertions(+), 12 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix some planner issues with degenerate outer join clauses.
In-Reply-To: <E1ZLhbI-0006WA-T4@gemulon.postgresql.org>
References: <E1ZLhbI-0006WA-T4@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