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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to