Re: HOT patch - version 15

Поиск
Список
Период
Сортировка
От Pavan Deolasee
Тема Re: HOT patch - version 15
Дата
Msg-id 2e78013d0709110511n4dc6409bk1edf9e4cf82bcde2@mail.gmail.com
обсуждение исходный текст
Ответ на Re: HOT patch - version 15  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches


On 9/11/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
"Pavan Deolasee" <pavan.deolasee@gmail.com> writes:
> Pruning removes intermediate dead tuples by marking their line pointers
> ~LP_USED and redirecting the root line pointer to the first
> live/recently_dead tuple in the chain.

It seems utterly unsafe to do this without a vacuum-grade lock on the
page.  Someone might be examining the root tuple (eg, in a SnapshotAny
scan) and I think they are entitled to assume that the line pointer
stays valid while they are looking at the tuple.


As the patch stands, we prune holding a vacuum-grade lock. But ISTM
that there are only limited users of SnapshotAny and we make them
recheck the line pointer after acquiring the buffer lock. So hopefully we
should be fine.

Anyways, its not a concern right now because we hold vacuum-grade lock while
pruning. But if we decide to what Heikki/Greg suggested about quick
pruning then we will have to make sure that your concern is addressed.


Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB     http://www.enterprisedb.com

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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: WIP patch for latestCompletedXid method of computing snapshot xmax
Следующее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: HOT patch - version 15