Re: Avoiding unnecessary reads in recovery - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Avoiding unnecessary reads in recovery
Date
Msg-id 462F53F6.5080202@enterprisedb.com
Whole thread Raw
In response to Avoiding unnecessary reads in recovery  (Heikki Linnakangas <heikki@enterprisedb.com>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum does not start in HEAD
Next
From: Gregory Stark
Date:
Subject: Re: Avoiding unnecessary reads in recovery