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

pgsql: Add defenses to btree and hash index AMs to do simple sanity

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add defenses to btree and hash index AMs to do simple sanity
Date: 2005-11-06 19:29:01
Message-ID: 20051106192901.B17EDDAAF6@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Add defenses to btree and hash index AMs to do simple sanity checks
on every index page they read; in particular to catch the case of an
all-zero page, which PageHeaderIsValid allows to pass.  It turns out
hash already had this idea, but it was just Assert()ing things rather
than doing a straight error check, and the Asserts were partially
redundant with PageHeaderIsValid anyway.  Per recent failure example
from Jim Nasby.  (gist still needs the same treatment.)

Modified Files:
--------------
    pgsql/src/backend/access/hash:
        hash.c (r1.81 -> r1.82)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hash.c.diff?r1=1.81&r2=1.82)
        hashinsert.c (r1.39 -> r1.40)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashinsert.c.diff?r1=1.39&r2=1.40)
        hashovfl.c (r1.47 -> r1.48)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashovfl.c.diff?r1=1.47&r2=1.48)
        hashpage.c (r1.52 -> r1.53)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashpage.c.diff?r1=1.52&r2=1.53)
        hashsearch.c (r1.41 -> r1.42)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashsearch.c.diff?r1=1.41&r2=1.42)
        hashutil.c (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/hash/hashutil.c.diff?r1=1.42&r2=1.43)
    pgsql/src/backend/access/nbtree:
        nbtinsert.c (r1.127 -> r1.128)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtinsert.c.diff?r1=1.127&r2=1.128)
        nbtpage.c (r1.88 -> r1.89)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtpage.c.diff?r1=1.88&r2=1.89)
        nbtree.c (r1.132 -> r1.133)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtree.c.diff?r1=1.132&r2=1.133)
    pgsql/src/include/access:
        hash.h (r1.63 -> r1.64)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/hash.h.diff?r1=1.63&r2=1.64)
        nbtree.h (r1.87 -> r1.88)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/nbtree.h.diff?r1=1.87&r2=1.88)

Responses

pgsql-committers by date

Next:From: User AmDate: 2005-11-06 21:49:20
Subject: press - pr: Release date is 8 nov afterall (?)
Previous:From: User XzillaDate: 2005-11-06 16:27:50
Subject: wikipedia - wikipgedia: Unfortunatly the original porters just decided

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