Re: B-tree parent pointer and checkpoints

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: B-tree parent pointer and checkpoints
Дата
Msg-id 4D7A5171.8000603@enterprisedb.com
обсуждение исходный текст
Ответ на Re: B-tree parent pointer and checkpoints  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: B-tree parent pointer and checkpoints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 11.03.2011 17:59, Tom Lane wrote:
> Heikki Linnakangas<heikki.linnakangas@enterprisedb.com>  writes:
>> On 10.03.2011 22:50, Bruce Momjian wrote:
>>> Bruce Momjian wrote:
>>
>> Has this been addressed?
>>>
>>> I see we have with this commit:
>>>
>>> 9de3aa65f01fb51cbc725e8508ea233e4e92c46c
>
>> We fixed GiST. B-tree still has the issue that if you have a checkpoint
>> in the middle of an insert, and crash, you might be left with a leaf
>> node without a downlink in the parent.
>
> But that will be fixed during WAL replay.

Not under the circumstances that started the original thread:

1. Backend splits a page
2. Checkpoint starts
3. Checkpoint runs to completion
4. Crash
(5. Backend never got to insert the parent pointer)

WAL replay starts at the checkpoint redo pointer, which is after the 
page split record, so WAL replay won't insert the parent pointer. That's 
an incredibly tight window to hit in practice, but it's possible in theory.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Flex output missing from 9.1a4 tarballs?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: multiple -f support