Re: checkpoints taking much longer than expected
| От | Andres Freund |
|---|---|
| Тема | Re: checkpoints taking much longer than expected |
| Дата | |
| Msg-id | 20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de обсуждение исходный текст |
| Ответ на | Re: checkpoints taking much longer than expected (Jeff Janes <jeff.janes@gmail.com>) |
| Список | pgsql-general |
On 2019-06-16 12:25:58 -0400, Jeff Janes wrote:
> Right, but true only because they were "checkpoint starting: immediate".
> Otherwise the reported write time includes intentional sleeps added to
> honor the checkpoint_completion_target. A bit confusing to report it that
> way, I think.
+1
It's even worse than that, actually. We also don't sleep if the *next*
requested checkpoint is an immediate one:
* Perform the usual duties and take a nap, unless we're behind schedule,
* in which case we just try to catch up as quickly as possible.
*/
if (!(flags & CHECKPOINT_IMMEDIATE) &&
!shutdown_requested &&
!ImmediateCheckpointRequested() &&
IsCheckpointOnSchedule(progress))
/*
* Returns true if an immediate checkpoint request is pending. (Note that
* this does not check the *current* checkpoint's IMMEDIATE flag, but whether
* there is one pending behind it.)
*/
static bool
ImmediateCheckpointRequested(void)
We ought to do better.
- Andres
В списке pgsql-general по дате отправления: