postgresql/src/backend/optimizer/path
Tom Lane ee63981c1f Avoid sharing subpath list structure when flattening nested AppendRels.
In some situations the original coding led to corrupting the child AppendRel's
subpaths list, effectively adding other members of the parent's list to it.
This was usually masked because we never made any further use of the child's
list, but given the right combination of circumstances, we could do so.  The
visible symptom would be a relation getting scanned twice, as in bug #5673
from David Schmitt.

Backpatch to 8.2, which is as far back as the risky coding appears.  The
example submitted by David only fails in 8.4 and later, but I'm not convinced
that there aren't any even-more-obscure cases where 8.2 and 8.3 would fail.
2010-09-23 15:34:56 -04:00
..
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
allpaths.c Avoid sharing subpath list structure when flattening nested AppendRels. 2010-09-23 15:34:56 -04:00
clausesel.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
costsize.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
equivclass.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
indxpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
joinpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
joinrels.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
orindxpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
pathkeys.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
tidpath.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00