Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait
Date
Msg-id 20170119145346.GP18360@tamriel.snowman.net
Whole thread Raw
In response to Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter,

* Peter Eisentraut (peter.eisentraut@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

pgsql-hackers by date:

Previous
From: Vladimir Gordiychuk
Date:
Subject: Re: SEGFAULT in HEAD with replication
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait