Re: Fwd: Clarification about HOT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fwd: Clarification about HOT
Дата
Msg-id 19017.1194273294@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fwd: Clarification about HOT  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Ответы Re: Fwd: Clarification about HOT  ("Gokulakannan Somasundaram" <gokul007@gmail.com>)
Список pgsql-hackers
"Gokulakannan Somasundaram" <gokul007@gmail.com> 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Gokulakannan Somasundaram"
Дата:
Сообщение: Re: Fwd: Clarification about HOT
Следующее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: Visibility map thoughts