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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Repair PANIC condition in hash indexes when a previous index
Date: 2007-04-19 20:24:04
Message-ID: 20070419202404.7F1389FB60E@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Modified Files:
--------------
pgsql/src/backend/access/hash:
README (r1.5 -> r1.6)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/README.diff?r1=1.5&r2=1.6)
hashovfl.c (r1.55 -> r1.56)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashovfl.c.diff?r1=1.55&r2=1.56)
hashpage.c (r1.65 -> r1.66)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashpage.c.diff?r1=1.65&r2=1.66)
pgsql/src/include/access:
hash.h (r1.78 -> r1.79)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/hash.h.diff?r1=1.78&r2=1.79)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-04-19 20:24:10 pgsql: Repair PANIC condition in hash indexes when a previous index
Previous Message Tom Lane 2007-04-19 16:33:32 pgsql: Fix plpgsql to avoid reference to already-freed memory when