Just noticed that PageIndexTupleDelete does not check that pd_special != MAXALIGN(pd_special)
whereas PageIndexMultiDelete() does this. Both routines state that "paranoia seems justified", so this omission looks like an error. Looking a little deeper at this... We only call PageIndexTupleDelete() in cases where PageIndexMultiDelete() has only a single element. We also call it directly (in btree case) when recovering page splits and when updating parent pages as part of page removal. Having a special function that exists only for use in rare occasions seems like a great recipe for sporadic corruption, if we are taking the "paranoia seems justified" approach. I would be inclined to dispose of PageIndexTupleDelete altogether. We may yet be able to optimise PageIndexMultiDelete for low values of nitems, if that is important. -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers