]> granicus.if.org Git - postgresql/commit
Repair PANIC condition in hash indexes when a previous index extension attempt
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Apr 2007 20:24:36 +0000 (20:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Apr 2007 20:24:36 +0000 (20:24 +0000)
commitb8f0a51a495875f88bd051974daa6aaa42c0e3c7
tree25fcac89413cb5c03cae51ea593dfaa114dbf40d
parentf1d934b6b3a36690f4e740d1fc8caa64c40ce35b
Repair PANIC condition in hash indexes when a previous index extension attempt
failed (due to lock conflicts or out-of-space).  We might have already
extended the index's filesystem EOF before failing, causing the EOF to be
beyond what the metapage says is the last used page.  Hence the invariant
maintained by the code needs to be "EOF is at or beyond last used page",
not "EOF is exactly the last used page".  Problem was created by my patch
of 2006-11-19 that attempted to repair bug #2737.  Since that was
back-patched to 7.4, this needs to be as well.  Per report and test case
from Vlastimil Krejcir.
src/backend/access/hash/README
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/include/access/hash.h