"Gokulakannan Somasundaram" <[EMAIL PROTECTED]> writes: > Currently, during Vacuum, we goto the Index and mark it as dead and > reclaim the space. For doing this, we are acquiring a Super-Exclusive lock. > After this implementation, we would update the index tuple instead of > marking it for cleanup. What can be foreseen as a locking overhead here?
There are three operations involved: marking the child tuple not-HOT, updating the index entry(s), and removing the parent tuple. I doubt you can do them safely as independent atomic operations; I think you'll need to have more than one page locked at a time. The locking problem also applies to trying to collapse out a dead HOT tuple that's in the middle of the chain: if it's the end of a cross-page link then you need two pages super-exclusive-locked in order to do that. There's also the little problem that a redirect line pointer doesn't have room for a cross-page link, and the big problem that having to chase across multiple pages for an index lookup would almost certainly negate any performance gains you might get. (In particular it'd completely destroy locality of access for bitmap indexscans...) regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend