postgresql/src/backend/optimizer/path
Tom Lane d7885b1f87 Build EC members for child join rels in the right memory context.
This patch prevents crashes or wrong plans when partition-wise joins
are considered during GEQO planning, as a consequence of the
EquivalenceClass data structures becoming corrupt after a GEQO
context reset.

A remaining problem is that successive GEQO cycles will make multiple
copies of the required EC members, since add_child_join_rel_equivalences
has no idea that such members might exist already.  For now we'll just
live with that.  The lack of field complaints of crashes suggests that
this is a mighty little-used situation.

Back-patch to v12 where this code was introduced.

Discussion: https://postgr.es/m/1683100.1601860653@sss.pgh.pa.us
2020-10-06 11:43:53 -04:00
..
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
allpaths.c Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE. 2020-08-30 12:21:51 -04:00
clausesel.c Fixup some misusages of bms_num_members() 2020-08-26 10:51:36 +12:00
costsize.c Adjust cost model for HashAgg that spills to disk. 2020-09-07 13:31:59 -07:00
equivclass.c Build EC members for child join rels in the right memory context. 2020-10-06 11:43:53 -04:00
indxpath.c Fix bitmap AND/OR scans on the inside of a nestloop partition-wise join. 2020-07-14 18:56:56 -04:00
joinpath.c Clean up newlines following left parentheses 2020-01-30 13:42:14 -03:00
joinrels.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
pathkeys.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
tidpath.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00