Re: Page at a time index scan
От | Heikki Linnakangas |
---|---|
Тема | Re: Page at a time index scan |
Дата | |
Msg-id | Pine.OSF.4.61.0605032102530.509589@kosh.hut.fi обсуждение исходный текст |
Ответ на | Re: Page at a time index scan (Heikki Linnakangas <hlinnaka@iki.fi>) |
Ответы |
Re: Page at a time index scan
|
Список | pgsql-patches |
On Wed, 3 May 2006, Heikki Linnakangas wrote: > On Tue, 2 May 2006, Tom Lane wrote: > >> Heikki Linnakangas <hlinnaka@iki.fi> writes: >>> On Tue, 2 May 2006, Tom Lane wrote: >>>> Backwards scan may break this whole concept; are you sure you've thought >>>> it through? >> >>> I think so. The patch doesn't change the walk-left code. Do you have >>> something specific in mind? >> >> I'm worried about synchronization, particularly what happens if the page >> gets deleted from under you while you don't have it pinned. > > AFAICS, shouldn't happen. The half-dead system makes sure that a page won't > get deleted while a scan might still be interested in it. It doesn't depend > on pins. As Tom pointed out elsewhere in this thread, the above explanation is wrong because half-dead state only applies to upper-level pages. I thought that half-dead means that the page is dead and removed from the tree, but not yet recycled because some transaction might still be interested in it. Now I see that that state is actually called "deleted". The point remains, however. A page won't get deleted while a scan might still be interested in it, because deleted pages are not immediately recycled (except on vacuum full), and the left and right sibling pointers stay intact until no transaction can be interested in it. - Heikki
В списке pgsql-patches по дате отправления: