Re: Spreading full-page writes

Поиск
Список
Период
Сортировка
Искать
От
Jeff Janes
Тема
Re: Spreading full-page writes
Дата
в 17:19:03
Msg-id
CAMkU=1yQx_Rs7AcEYfWrSUj3ev4nanwoZuAyhdE8x1K6=eWXeQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Robert Haas <robertmhaas@gmail.com>
Re: Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Robert Haas <robertmhaas@gmail.com>
Re: Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Jeff Janes <jeff.janes@gmail.com>
Re: Spreading full-page writes Simon Riggs <simon@2ndQuadrant.com>
Re: Spreading full-page writes Greg Stark <stark@mit.edu>
Re: Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Greg Stark <stark@mit.edu>
Re: Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Robert Haas <robertmhaas@gmail.com>
Re: Spreading full-page writes Simon Riggs <simon@2ndQuadrant.com>
Re: Spreading full-page writes Simon Riggs <simon@2ndQuadrant.com>
Re: Spreading full-page writes Fujii Masao <masao.fujii@gmail.com>
Re: Spreading full-page writes Simon Riggs <simon@2ndQuadrant.com>
Re: Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Simon Riggs <simon@2ndQuadrant.com>
Re: Spreading full-page writes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Spreading full-page writes Amit Kapila <amit.kapila16@gmail.com>
Re: Spreading full-page writes Fujii Masao <masao.fujii@gmail.com>
Re: Spreading full-page writes Amit Kapila <amit.kapila16@gmail.com>
Re: Spreading full-page writes Fujii Masao <masao.fujii@gmail.com>
On Mon, May 26, 2014 at 8:15 PM, Robert Haas <robertmhaas@gmail.com> wrote:
On Mon, May 26, 2014 at 1:22 PM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:
>>I don't think we know that. The server might have crashed before that
>>second record got generated.  (This appears to be an unfixable flaw in
>>this proposal.)
>
> The second record is generated before the checkpoint is finished and the checkpoint record is written.  So it will be there.
>
> (if you crash before the checkpoint is finished, the in-progress checkpoint is no good for recovery anyway, and won't be used)

Hmm, I see.

It's not great to have to generate WAL at buffer-eviction time,
though.  Normally, when we go to evict a buffer, the WAL is already
written.  We might have to wait for it to be flushed, but if the WAL
writer is doing its job, hopefully not.  But here we'll definitely
have to wait for the WAL flush.

I'm not sure we do need to flush it.  If the checkpoint finishes, then the WAL surely got flushed as part of the process of recording the end of the checkpoint.  If the checkpoint does not finish, recovery will start from the previous checkpoint, which does contain the FPW (because if it didn't, the page would not be eligible for this treatment) and so the possibly torn page will get overwritten in full.
 
Cheers,

Jeff
В списке pgsql-hackers по дате отправления
От: Ronan Dunklau
Дата:
От: Tom Lane
Дата:
FAQ