Обсуждение: GiST crash recovery (potential problems?)

Поиск
Список
Период
Сортировка

GiST crash recovery (potential problems?)

От
Koichi Suzuki
Дата:
Hi,

In GiST, I found that after the crash recovery, NSN and right page link
are initialized.   We can search all the records in this case but
performance may become a little worse because we cannot traverse leaves.

I'm not sure if it is preffered behavior.

-- 
Koichi Suzuki



Re: GiST crash recovery (potential problems?)

От
Teodor Sigaev
Дата:
> In GiST, I found that after the crash recovery, NSN and right page link
> are initialized.   We can search all the records in this case but
> performance may become a little worse because we cannot traverse leaves.

It doesn't matter. NSN and rightlink are used only during concurrent access:
while we are scanning pages and page's LSN is changed - then page is changed. 
And if page is changed and LSN of parent page is less than NSN of current page 
then we should check right page. NSN and rightlink are changed synchronously.

Look at gistget.c lines 185-197 (gistnext()) and at gistplacetopage() in gist.c

The code doesn't believe that rigthlink is correct in any time and doesn't 
believe that you can read all level of tree following by right link as btree 
does. During recovery NSN doesn't increase.

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/