Re: corrupt pages detected by enabling checksums

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: corrupt pages detected by enabling checksums
Дата
Msg-id CA+U5nMJ7eQ33hNbQzFirQjXC7UUB0mwuFK3mvEJ-k6Yw7Uo1cA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: corrupt pages detected by enabling checksums  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On 10 May 2013 23:41, Jeff Davis <pgsql@j-davis.com> wrote:
> On Fri, 2013-05-10 at 18:32 +0100, Simon Riggs wrote:
>> We don't write() WAL except with an immediate sync(), so the chances
>> of what you say happening are very low to impossible.
>
> Are you sure? An XLogwrtRqst contains a write and a flush pointer, so I
> assume they can be different.

I'm answering this just to complete the discussion.

Yes, the write and flush pointer can be different. The write/flush are
two actions; we do one first, then the other, very quickly, inside
XLogWrite().

But we cannot rely on that, since there are some times when we don't
do that, such as wal_buffer overflow and when background walwriter
writes are at the end of the ring buffer. Not common, but they do
exist and when they exist they write many blocks. Which is counter to
what I had said earlier.

This part of the proposal isn't necessary for us to get a good answer
95% of the time, so it is dropped.

As mentioned on other post, we can write
UpdateMinRecoveryPoint(LogwrtResult.Flush, false) every time we do
XLogBackgroundFlush() and some other rework to make that happen
correctly. I'll post a separate patch.

--Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: issues with dropped columns in plpgsql code again
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Proposal to add --single-row to psql