Make some adjustments to reduce platform dependencies in plan selection.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Dec 2004 01:34:18 +0000 (01:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Dec 2004 01:34:18 +0000 (01:34 +0000)
commit4e91824b9490a73619200e9d18b9234263d124d3
tree609c943467a8aff8821618b8c78f1aa808d2942d
parentee9007a2e19793e0592ad4c09d464a85511a2dfb
Make some adjustments to reduce platform dependencies in plan selection.
In particular, there was a mathematical tie between the two possible
nestloop-with-materialized-inner-scan plans for a join (ie, we computed
the same cost with either input on the inside), resulting in a roundoff
error driven choice, if the relations were both small enough to fit in
sort_mem.  Add a small cost factor to ensure we prefer materializing the
smaller input.  This changes several regression test plans, but with any
luck we will now have more stability across platforms.
src/backend/optimizer/path/costsize.c
src/backend/optimizer/util/plancat.c
src/test/regress/expected/geometry.out
src/test/regress/expected/geometry_1.out
src/test/regress/expected/geometry_2.out
src/test/regress/expected/inherit.out
src/test/regress/expected/join.out
src/test/regress/sql/inherit.sql
src/test/regress/sql/join.sql