pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Tiemen Ruiten <t.ruiten@tech-lab.io>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: checkpoints taking much longer than expected
Date: Mon, 17 Jun 2019 10:43:34 -0700
Message-ID: <20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de> (raw)
In-Reply-To: <CAMkU=1w2dboWLEtv9iy+LvmDTceQ+qNTf4puqn4H5TsGS8yWyQ@mail.gmail.com>
References: <CAEkBuzeno6ztiM1g4WdzKRJFgL8b2nfePNU=q3sBiEZUm-D-sQ@mail.gmail.com>
	<20190614154350.GE2480@tamriel.snowman.net>
	<CAEkBuzdUpqh5fMDGRC661ffWukFNUESxXs8ByrVrj6O9kDCs3g@mail.gmail.com>
	<CAMkU=1w2dboWLEtv9iy+LvmDTceQ+qNTf4puqn4H5TsGS8yWyQ@mail.gmail.com>

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





view thread (22+ messages)

Message-ID: <20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de>
Permalink:  ../20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: andres@anarazel.de, jeff.janes@gmail.com, t.ruiten@tech-lab.io, sfrost@snowman.net
  Subject: Re: checkpoints taking much longer than expected
  In-Reply-To: <20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de>
  References: <CAEkBuzeno6ztiM1g4WdzKRJFgL8b2nfePNU=q3sBiEZUm-D-sQ@mail.gmail.com> <20190614154350.GE2480@tamriel.snowman.net> <CAEkBuzdUpqh5fMDGRC661ffWukFNUESxXs8ByrVrj6O9kDCs3g@mail.gmail.com> <CAMkU=1w2dboWLEtv9iy+LvmDTceQ+qNTf4puqn4H5TsGS8yWyQ@mail.gmail.com> <20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox