Re: Checkpoint cost, looks like it is WAL/CRC

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Checkpoint cost, looks like it is WAL/CRC
Дата
Msg-id 871x6fwynt.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Checkpoint cost, looks like it is WAL/CRC  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Checkpoint cost, looks like it is WAL/CRC  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > Can someone explain exactly what the problem being defeated by writing whole
> > pages to the WAL log?
> 
> Partial writes.  Without the full-page image, we do not have enough
> information in WAL to reconstruct the correct page contents.

Sure, but why not?

If a 8k page contains 16 low level segments on disk and the old data is
AAAAAAAAAAAAAAAA and the new data is AAABAAACAAADAAAE then the WAL would
contain the B, C, D, and E. Shouldn't that be enough to reconstruct the page?

If the actual write only got out AAABAAACAAAAAAAA the resulting page is
garbage but why isn't what the WAL has enough information to reconstruct the
new version?

I do worry that a drive could write AAABAAACXYZKWBFH if it loses power in the
middle of the write, though. That would be bad.

-- 
greg



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: contrib/pgcrypto functions not IMMUTABLE?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Checkpoint cost, looks like it is WAL/CRC