]> granicus.if.org Git - postgresql/commit
Don't trust deferred-unique indexes for join removal.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Oct 2011 04:43:45 +0000 (00:43 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Oct 2011 04:43:45 +0000 (00:43 -0400)
commit18661c67e96ff4a81ab3844843a73676d161db0c
tree6cc45485bd8ffda5563a07c9c2fa477d247b7711
parent8e8ac0894b196c4dd8618bca1f598f13bf5e18ea
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.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/util/plancat.c
src/backend/utils/adt/selfuncs.c
src/include/nodes/relation.h