Peter, * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > 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.
Sure, but we're talking about replaying WAL vs. doing a checkpoint, not about writing WAL vs. replaying WAL. Replaying WAL and doing a checkpoint both require writing to lots of different places across the filesystem, of course. There can be cases where individual backends are having to evict pages to clear space for new pages to be pulled in and that could have an effect of making a checkpoint happen with multiple processes, but that's a bit of a different situation. Of course, it would be nice if we could make our replay of WAL multi-process, and checkpointing too, for that matter. Thanks! Stephen
Description: Digital signature