]> 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:52 +0000 (00:43 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 23 Oct 2011 04:43:52 +0000 (00:43 -0400)
commit9fbb3edff085f2f004c24b988b43c7cd4f132e2f
tree1a360a0fda28d51e64f6b8784f84d4a37fe3cd6f
parent015cda44cfc5e02ec7147ab55560bd14c74acf08
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