pgsql: Repair PANIC condition in hash indexes when a previous index

Started by Tom Laneover 19 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
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.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
pgsql/src/backend/access/hash:
README (r1.3 -> r1.3.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/README.diff?r1=1.3&r2=1.3.2.1)
hashovfl.c (r1.41.2.1 -> r1.41.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashovfl.c.diff?r1=1.41.2.1&r2=1.41.2.2)
hashpage.c (r1.42.2.1 -> r1.42.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashpage.c.diff?r1=1.42.2.1&r2=1.42.2.2)
pgsql/src/include/access:
hash.h (r1.53 -> r1.53.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/hash.h.diff?r1=1.53&r2=1.53.2.1)