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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't trust deferred-unique indexes for join removal.
Date: 2011-10-23 04:44:47
Message-ID: E1RHpvT-0001nV-9M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0f39d5050dc0dce99258381f33f1832c437aff85

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 | 1 +
5 files changed, 15 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-10-23 18:36:06 pgsql: Improve git_changelog's handling of inconsistent commit ordering
Previous Message Tom Lane 2011-10-22 22:24:00 pgsql: Support synchronization of snapshots through an export/import pr