Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcvfS-0003lG-7f for pgsql-general@arkaria.postgresql.org; Mon, 17 Jun 2019 17:43:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hcvfR-0001EY-1p for pgsql-general@arkaria.postgresql.org; Mon, 17 Jun 2019 17:43:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcvfQ-0001Bp-L3 for pgsql-general@lists.postgresql.org; Mon, 17 Jun 2019 17:43:40 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hcvfO-0005qb-9U for pgsql-general@postgresql.org; Mon, 17 Jun 2019 17:43:39 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1FEA2222CE; Mon, 17 Jun 2019 13:43:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 17 Jun 2019 13:43:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=RYuk4qy2cF20HvcOzJ/puVY5AKk gUhDuPUDJXwy2Oq0=; b=VSxXKGw5hkol6ljOClJGsigkCtlyt4sa0817zssTbvh BAE3/1tfjA9K4cNvRXHX+kmj6y6RJ6XwC/T+jP+L9eYxAAS9CojDI9seQM9W6AlM 5pJAckVnYT4AqiNnJOCq/qhTBdUPgbC6kx+SFikJaS3yAdTcSnNW3RuIiXWOyrom elxB//Y7QcgDCGQ9KeNfgs0STMtf56AOP+kVZcUW35bpVVHtTJArFs+PL73nN7HH VrC3MV1qs54Pxib6eG38IBke2nSAY7ZKuAoIb0tHfBl08TVzdHD1nKaX0YO7tYuT 4yCm7cBk1isPglaSKeOnWDfjUhvqHpxAUKNtRXfM/6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=RYuk4q y2cF20HvcOzJ/puVY5AKkgUhDuPUDJXwy2Oq0=; b=aWPdltsZmt2LG6WLauXhhh P9+nTrLjjx3RIjU64c6UNPHojIF5p8epkKjWToblZJaBjLF8PVfQt7YVygWYADL8 /xKvBMEXbrHiIBxh2I74QcB1Ziz9Ief1VIl6eQ5o9O9MwaB0+p0/gShOGJ7pP7ko UbeeT3mr9f3jXOZNgaUvXY2lkUhfEjRMDw9zYVMAwRXk4EbveyqYSMnewam/bFcF AnhKe04zM6nN/ok2D5q5gTEC+aESrPioUA6auvaD8vyw5fFfO1UjJbuNTUrD2ddw d4Fb1enP04R/TLLJImy+Mzgapk2QLWFTopyqq9SlbdyblPiwrY7GstqXJFo5A38g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudeijedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppe eijedrudeitddrvddukedrvdefjeenucfrrghrrghmpehmrghilhhfrhhomheprghnughr vghssegrnhgrrhgriigvlhdruggvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id 25347380086; Mon, 17 Jun 2019 13:43:36 -0400 (EDT) Date: Mon, 17 Jun 2019 10:43:34 -0700 From: Andres Freund To: Jeff Janes Cc: Tiemen Ruiten , Stephen Frost , Postgres General Subject: Re: checkpoints taking much longer than expected Message-ID: <20190617174334.ajdu667gcgjxt7f3@alap3.anarazel.de> References: <20190614154350.GE2480@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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