GiST crash recovery (potential problems?)

Started by Koichi Suzukiabout 18 years ago2 messages
#1Koichi Suzuki
suzuki.koichi@oss.ntt.co.jp

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

#2Teodor Sigaev
teodor@sigaev.ru
In reply to: Koichi Suzuki (#1)
Re: GiST crash recovery (potential problems?)

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/