From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Remove an unsafe Assert, and explain join_clause_is_movable_into
Date: Tue, 28 Jul 2015 17:21:28 +0000
Message-ID: <E1ZK8ZE-0002L4-5d@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Remove an unsafe Assert, and explain join_clause_is_movable_into() better.
join_clause_is_movable_into() is approximate, in the sense that it might
sometimes return "false" when actually it would be valid to push the given
join clause down to the specified level. This is okay ... but there was
an Assert in get_joinrel_parampathinfo() that's only safe if the answers
are always exact. Comment out the Assert, and add a bunch of commentary
to clarify what's going on.
Per fuzz testing by Andreas Seltenreich. The added regression test is
a pretty silly query, but it's based on his crasher example.
Back-patch to 9.2 where the faulty logic was introduced.
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/d6a8a29ac2bca06d4466e449f13d0cc52220714b
Modified Files
--------------
src/backend/optimizer/util/relnode.c | 9 ++++++
src/backend/optimizer/util/restrictinfo.c | 31 +++++++++++++++----
src/test/regress/expected/join.out | 48 +++++++++++++++++++++++++++++
src/test/regress/sql/join.sql | 27 ++++++++++++++++
4 files changed, 109 insertions(+), 6 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: Remove an unsafe Assert, and explain join_clause_is_movable_into
In-Reply-To: <E1ZK8ZE-0002L4-5d@gemulon.postgresql.org>
References: <E1ZK8ZE-0002L4-5d@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