Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait
Дата
Msg-id 20170119150609.GR18360@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] Re: Clarifying "server starting" messaging in pg_ctlstart without --wait  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
> On 1/19/17 9:53 AM, Stephen Frost wrote:
> > 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.
>
> Yeah, but they are each doing different things, so you can't say that
> one will take the same amount of time or strictly less than the other.
> It might be a good first estimation, but my practical experience is that
> it's not when it really matters. :-/

You've found that WAL replay following a crash takes longer than
checkpointing and therefore crash recovery requires more time than
checkpoint_timeout is set to?

WAL replay does do more work, generally speaking (the WAL has to be
read, the checksum validated on it, and then the write has to go out,
while the checkpointer just writes the page out from memory), but it's
also dealing with less contention on the system (there aren't a bunch of
backends hammering the disks to pull data in with reads when you're
doing crash recovery...).  We did make the WAL checksum routines a lot
faster with 9.6, as I recall, so perhaps there's been some change there
too.

Thanks!

Stephen

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Wolfgang Wilhelm
Дата:
Сообщение: Re: [HACKERS] ISO/IEC 9075-2:2016 for postgres community
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] [PATCH] Fix minor race in commit_ts SLRU truncation vslookups