Re: Avoiding unnecessary reads in recovery

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Avoiding unnecessary reads in recovery
Дата
Msg-id 462F53F6.5080202@enterprisedb.com
обсуждение исходный текст
Ответ на Avoiding unnecessary reads in recovery  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas wrote:
> While working on this, this comment in ReadBuffer caught my eye:
> 
>>     /*
>>      * During WAL recovery, the first access to any data page should
>>      * overwrite the whole page from the WAL; so a clobbered page
>>      * header is not reason to fail.  Hence, when InRecovery we may
>>      * always act as though zero_damaged_pages is ON.
>>      */
>>     if (zero_damaged_pages || InRecovery)
>>     {
> 
> But that assumption only holds if full_page_writes is enabled, right? I 
> changed that in the attached patch as well, but if it isn't accepted 
> that part of it should still be applied, I think.

On second thought, my fix still isn't 100% right because one could turn 
full_page_writes on before starting replay.

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


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: autovacuum does not start in HEAD
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Avoiding unnecessary reads in recovery