Skip site navigation (1) Skip section navigation (2)

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

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-breakerin
Date: 2012-04-21 04:51:25
Message-ID: E1SLSI9-0000Pv-6n@gemulon.postgresql.org (view raw or flat)
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(-)

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group