On 1/18/17 3:12 PM, Stephen Frost wrote:
> I don't understand what I'm missing when it comes to checkpoint_timeout
> and the time required to recover from a crash. You aren't the first
> person to question that association, but it seems pretty clear to me.
>
> When doing recovery, we have to replay everything since the last
> checkpoint. If we are checkpointing at least every 5 minutes then we
> can't have any more than 5 minutes worth of WAL to replay, right?
But writing WAL and replaying WAL are two entirely different operations.Writing a WAL record involves writing a few
bytessequentially.
Replaying a WAL record might involve hopping all over the system and
applying the changes that the WAL record describes.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services