PageIndexTupleDelete - Mailing list pgsql-hackers

From Simon Riggs
Subject PageIndexTupleDelete
Date
Msg-id 1260094103.13774.44266.camel@ebony
Whole thread Raw
Responses Re: PageIndexTupleDelete
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Hot standby, misc issues
Next
From: Kurt Harriman
Date:
Subject: Re: Patch: Remove gcc dependency in definition of inline functions