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

pgsql: Fix GiST buffering build bug,which caused "failed to re-find pa

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix GiST buffering build bug,which caused "failed to re-find pa
Date: 2012-08-16 10:02:18
Message-ID: E1T1wuA-0001Pq-AH@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix GiST buffering build bug, which caused "failed to re-find parent" errors.

We use a hash table to track the parents of inner pages, but when inserting
to a leaf page, the caller of gistbufferinginserttuples() must pass a
correct block number of the leaf's parent page. Before gistProcessItup()
descends to a child page, it checks if the downlink needs to be adjusted to
accommodate the new tuple, and updates the downlink if necessary. However,
updating the downlink might require splitting the page, which might move the
downlink to a page to the right. gistProcessItup() doesn't realize that, so
when it descends to the leaf page, it might pass an out-of-date parent block
number as a result. Fix that by returning the block a tuple was inserted to
from gistbufferinginserttuples().

This fixes the bug reported by Zdeněk Jílovec.

Branch
------
REL9_2_STABLE

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

Modified Files
--------------
src/backend/access/gist/gist.c      |   33 ++++++++++++++++++++++++++-------
src/backend/access/gist/gistbuild.c |   19 +++++++++++++------
src/include/access/gist_private.h   |    3 ++-
3 files changed, 41 insertions(+), 14 deletions(-)

pgsql-committers by date

Next:From: Dave PageDate: 2012-08-16 10:43:35
Subject: pginstaller - pginst: Update for 8.3.20
Previous:From: Bruce MomjianDate: 2012-08-16 03:57:33
Subject: pgsql: Fix SGML markup; missing tag.

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