pgsql: Use fuzzy not exact cost comparison for the final tie-breaker in - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Use fuzzy not exact cost comparison for the final tie-breaker in
Date
Msg-id E1SLSI9-0000Pv-6n@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Use fuzzy not exact cost comparison for the final tie-breaker in add_path.

Instead of an exact cost comparison, use a fuzzy comparison with 1e-10
delta after all other path metrics have proved equal.  This is to avoid
having platform-specific roundoff behaviors determine the choice when
two paths are really the same to our cost estimators.  Adjust the
recently-added test case that made it obvious we had a problem here.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/33e99153e93b9accfa51ac036828144e1c2507b7

Modified Files
--------------
src/backend/optimizer/util/pathnode.c |   44 ++++++++++++++++++++++----------
src/test/regress/expected/join.out    |   16 ++++++------
2 files changed, 38 insertions(+), 22 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Recast "ONLY" column CHECK constraints as NO INHERIT
Next
From: Thom Brown
Date:
Subject: Re: pgsql: Recast "ONLY" column CHECK constraints as NO INHERIT