Re: GiST crash recovery (potential problems?) - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: GiST crash recovery (potential problems?)
Date
Msg-id 473DF5E2.2090405@sigaev.ru
Whole thread Raw
In response to GiST crash recovery (potential problems?)  (Koichi Suzuki <suzuki.koichi@oss.ntt.co.jp>)
List pgsql-hackers
> 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/
 


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Call for translations
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: update files for beta3