Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8ATN-0006Ef-Lt for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Aug 2020 22:52:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k8ATK-00047n-Fj for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Aug 2020 22:52:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8ATK-00047g-36 for pgsql-hackers@lists.postgresql.org; Tue, 18 Aug 2020 22:52:50 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k8ATC-0006eS-Kq for pgsql-hackers@postgresql.org; Tue, 18 Aug 2020 22:52:48 +0000 Received: by mail-io1-xd34.google.com with SMTP id q75so22934545iod.1 for ; Tue, 18 Aug 2020 15:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=u94lb391xD8ZlBQEEGAkbCWMk1+6Ez/6Pn049oKEcUg=; b=E9dRqDa4ZpsRSjVrgyDnGkd9UUVDUlXVXdOA1YDzRSPKFmaThdc8HjFf9H9DAXabkK RvN+fthzAHwQg94k/33kXm6uRfDig5i2TWNPy2uNiJcbWfG0nrhTnYJ6VpzuEhJABfR1 nYzhKCP2qwV1MX0tvsH/zxIdyj2x7n+FXCjU1hj4QncMhjd3+MBi9oPVuwZg/bSbkC4K nRXTrTdTVFvQyZRZejS3jP49ohICsALqd1Nq7FBf9Ike57DLqSUr1a/+QAzsyXOOa+SQ qfosifQGNrl89KZ8+CeQSbhZMWB8E6uWn3ex29T/VHEmONwCYYETzaBypXymA4VoRnBu Okvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=u94lb391xD8ZlBQEEGAkbCWMk1+6Ez/6Pn049oKEcUg=; b=Bd/hEbYzJ/CmEDIUji3QSVF96tpDlfZaLhFmxlWpSvYgCNY3q9UnLr+S740lUIJcI1 Uw7Iom61s1wcqfvTvxKaf411LA2444pqSneyRDcwqZ9NJ0x5a2qsepH0CaNp87L+Xg1o B7CDO1io8KPWMRIcZ4Pdn35SBvs4TK7zppmw7c7YfL1cqFJPufVyP2BfBVSvFfHFgzvT Kd4LI7JQABV4CN0AiglZZ+xsopzhXaHU/A+vNZUUnj0n9YzbZXVz/7NwwY7e86aZVZwG f4VMM5jIUjHEw5FWsoVf3CuiNcFB2KGnrpSp2gxuAftDml3H+pvZyPBeWCZ0o7OAsRV1 nvlQ== X-Gm-Message-State: AOAM533Hh8gMM27i7RtGMNwTySi+Eo1ndCVFbujJlqUQ1EUFBSz/Bfws uyI4YTIZV23Z21ks+9qk4E11663uzis/yA== X-Google-Smtp-Source: ABdhPJwnIGShVj3mYSj5geQo1w5mtvXkxL4MaawsYZWSNUGHtv+uMD86u+iU9kpr2UlwsfWm9uAbvw== X-Received: by 2002:a02:3f16:: with SMTP id d22mr20991979jaa.30.1597791161526; Tue, 18 Aug 2020 15:52:41 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 13sm11905760ilz.58.2020.08.18.15.52.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Aug 2020 15:52:40 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 220118002BE; Tue, 18 Aug 2020 17:52:39 -0500 (CDT) Date: Tue, 18 Aug 2020 17:52:39 -0500 From: Justin Pryzby To: pgsql-hackers@postgresql.org Subject: please update ps display for recovery checkpoint Message-ID: <20200818225238.GP17022@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="xJK8B5Wah2CMJs8h" Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --xJK8B5Wah2CMJs8h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline During crash recovery, the server writes this to log: < 2020-08-16 08:46:08.601 -03 >LOG: redo done at 2299C/1EC6BA00 < 2020-08-16 08:46:08.877 -03 >LOG: checkpoint starting: end-of-recovery immediate But runs a checkpoint, which can take a long time, while the "ps" display still says "recovering NNNNNNNN". Please change to say "recovery checkpoint" or similar, as I mentioned here. https://www.postgresql.org/message-id/20200118201111.GP26045@telsasoft.com -- Justin --xJK8B5Wah2CMJs8h Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Update-PS-display-following-replay-of-last-xlog.patch" From 93c716bbbb0f39bf63593e10d7730160668016d7 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 8 Feb 2020 09:16:14 -0600 Subject: [PATCH 1/3] Update PS display following replay of last xlog.. ..otherwise it shows "recovering " for the duration of the recovery checkpoint. --- src/backend/access/transam/xlog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 09c01ed4ae..8e08ce09da 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7765,7 +7765,10 @@ StartupXLOG(void) CHECKPOINT_WAIT); } else + { + set_ps_display("recovery checkpoint"); CreateCheckPoint(CHECKPOINT_END_OF_RECOVERY | CHECKPOINT_IMMEDIATE); + } } if (ArchiveRecoveryRequested) -- 2.17.0 --xJK8B5Wah2CMJs8h Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-Document-that-checkpoint_flush_after-applies-to-end-.patch" From 78e6ad73352240849982452ed1fb4cd0b8ed303e Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 18 Jan 2020 13:44:08 -0600 Subject: [PATCH 2/3] Document that checkpoint_flush_after applies to end-of-recovery checkpoint --- doc/src/sgml/config.sgml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 7a7177c550..c0b5422599 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3175,6 +3175,8 @@ include_dir 'conf.d' that are bigger than , but smaller than the OS's page cache, where performance might degrade. This setting may have no effect on some platforms. + This setting also applies to the checkpoint written at the end of crash + recovery. If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The valid range is -- 2.17.0 --xJK8B5Wah2CMJs8h Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0003-Avoid-ambiguous-that.patch" From 8f27859d6ed5ee69773171c79cc9c26a18f65a67 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sat, 18 Jan 2020 13:44:33 -0600 Subject: [PATCH 3/3] Avoid ambiguous "that" --- doc/src/sgml/config.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index c0b5422599..84b40467b3 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -3170,7 +3170,7 @@ include_dir 'conf.d' limit the amount of dirty data in the kernel's page cache, reducing the likelihood of stalls when an fsync is issued at the end of the checkpoint, or when the OS writes data back in larger batches in the - background. Often that will result in greatly reduced transaction + background. This feature will often result in greatly reduced transaction latency, but there also are some cases, especially with workloads that are bigger than , but smaller than the OS's page cache, where performance might degrade. This -- 2.17.0 --xJK8B5Wah2CMJs8h--