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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Use fuzzy not exact cost comparison for the final tie-breaker in
Date: 2012-04-21 04:51:25
Message-ID: E1SLSI9-0000Pv-6n@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thom Brown 2012-04-21 08:17:21 Re: pgsql: Recast "ONLY" column CHECK constraints as NO INHERIT
Previous Message Alvaro Herrera 2012-04-21 02:57:47 pgsql: Recast "ONLY" column CHECK constraints as NO INHERIT