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

pgsql: Fix logic bug in gistchoose andgistRelocateBuildBuffersOnSplit.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix logic bug in gistchoose andgistRelocateBuildBuffersOnSplit.
Date: 2012-08-30 17:10:02
Message-ID: E1T78Fm-0005Ic-2N@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix logic bug in gistchoose and gistRelocateBuildBuffersOnSplit.

Every time the best-tuple-found-so-far changes, we need to reset all
the penalty values in which_grow[] to the penalties for the new best
tuple.  The old code failed to do this, resulting in inferior index
quality.

The original patch from Alexander Korotkov was just two lines; I took
the liberty of fleshing that out by adding a bunch of comments that I
hope will make this logic easier for others to understand than it was
for me.

Branch
------
master

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

Modified Files
--------------
src/backend/access/gist/gistbuildbuffers.c |   43 +++++++++++++++++++++++----
src/backend/access/gist/gistutil.c         |   45 ++++++++++++++++++++++++++-
2 files changed, 80 insertions(+), 8 deletions(-)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2012-08-30 17:13:49
Subject: pgsql: Remove old documentation warnings about the use of bigint.
Previous:From: Tom LaneDate: 2012-08-30 16:57:06
Subject: pgsql: Improve EXPLAIN's ability to cope with LATERAL references inpla

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