Re: 16-bit page checksums for 9.2

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: 16-bit page checksums for 9.2
Дата
Msg-id CAMkU=1z0rXwbzgezh25Tz0J0zfMO7M4YFv5XUDUMPLZPkiYGCA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: 16-bit page checksums for 9.2  (Ants Aasma <ants.aasma@eesti.ee>)
Ответы Re: 16-bit page checksums for 9.2  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 12/29/11, Ants Aasma <ants.aasma@eesti.ee> wrote:

> Unless I'm missing something, double-writes are needed for all writes,
> not only the first page after a checkpoint. Consider this sequence of
> events:
>
> 1. Checkpoint
> 2. Double-write of page A (DW buffer write, sync, heap write)
> 3. Sync of heap, releasing DW buffer for new writes.
>  ... some time goes by
> 4. Regular write of page A
> 5. OS writes one part of page A
> 6. Crash!
>
> Now recovery comes along, page A is broken in the heap with no
> double-write buffer backup nor anything to recover it by in the WAL.

Isn't 3 the very definition of a checkpoint, meaning that 4 is not
really a regular write as it is the first one after a checkpoint?

But it doesn't seem safe to me replace a page from the DW buffer and
then apply WAL to that replaced page which preceded the age of the
page in the buffer.

Cheers,

Jeff


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: spinlocks on powerpc
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Progress on fast path sorting, btree index creation time