pgsql: Don't trust deferred-unique indexes for join removal. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Don't trust deferred-unique indexes for join removal.
Date
Msg-id E1RHpvT-0001nY-Bv@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Don't trust deferred-unique indexes for join removal.

The uniqueness condition might fail to hold intra-transaction, and assuming
it does can give incorrect query results.  Per report from Marti Raudsepp,
though this is not his proposed patch.

Back-patch to 9.0, where both these features were introduced.  In the
released branches, add the new IndexOptInfo field to the end of the struct,
to try to minimize ABI breakage for third-party code that may be examining
that struct.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/18661c67e96ff4a81ab3844843a73676d161db0c

Modified Files
--------------
src/backend/nodes/outfuncs.c          |    1 +
src/backend/optimizer/path/indxpath.c |    7 ++++---
src/backend/optimizer/util/plancat.c  |    6 ++++++
src/backend/utils/adt/selfuncs.c      |    4 +++-
src/include/nodes/relation.h          |    3 +++
5 files changed, 17 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Don't trust deferred-unique indexes for join removal.
Next
From: Tom Lane
Date:
Subject: pgsql: Improve git_changelog's handling of inconsistent commit ordering