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

pgsql: Improve coding of gistchoose andgistRelocateBuildBuffersOnSplit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve coding of gistchoose andgistRelocateBuildBuffersOnSplit
Date: 2012-08-31 02:53:36
Message-ID: E1T7HMW-0005aP-97@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Improve coding of gistchoose and gistRelocateBuildBuffersOnSplit.

This is mostly cosmetic, but it does eliminate a speculative portability
issue.  The previous coding ignored the fact that sum_grow could easily
overflow (in fact, it could be summing multiple IEEE float infinities).
On a platform where that didn't guarantee to produce a positive result,
the code would misbehave.  In any case, it was less than readable.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e5db11c5582b469c04a11f217a0f32c827da5dd7

Modified Files
--------------
src/backend/access/gist/gistbuildbuffers.c |   84 ++++++++++++--------
src/backend/access/gist/gistutil.c         |  113 +++++++++++++++-------------
2 files changed, 110 insertions(+), 87 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-08-31 03:49:03
Subject: pgsql: Back-patch recent fixes for gistchoose andgistRelocateBuildBuff
Previous:From: Bruce MomjianDate: 2012-08-31 01:40:43
Subject: pgsql: Add Perl emacs formatting macros tosrc/tools/editors/emacs.samp

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