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 1kGEKu-0001kJ-HE for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2020 04:37:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kGEKt-0000b1-52 for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Sep 2020 04:37:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGEKr-0000au-KI for pgsql-hackers@lists.postgresql.org; Thu, 10 Sep 2020 04:37:26 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGEKn-0006ua-9l for pgsql-hackers@postgresql.org; Thu, 10 Sep 2020 04:37:25 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id D8502882; Thu, 10 Sep 2020 00:37:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 10 Sep 2020 00:37:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=+aRwlnAD349ZKJPZR9EtBttwI8J +D4ic4kQRP8VSvSY=; b=mIb79ks/z9JEDsj3PYr3acoXwIkGf0msCujmfU0Kd+c ku95xYoMJRwdjMA8Kutm/6vUNvGt2zhDTTJcsWbgveAWi905fx2in0s7WhcO+GU2 1qXGBINrbcKckShTYAPq8ytqSiwDj6t5QBHmRpO0ZKjr/b301tvJLywC1CDWISeI pGQ2yRIkN3lvKlfuDYhFAKwe+Fa7GLe42ti63Ols0TODMuYsE8mzy2M2yMQfmNe6 Ao+UtO8rFLY5fY+g3cCbQGJ57K4WkT65ufIJUuz16/iqUoG0bgU/E82LVZxtVr5X KByeJnetLte4v6HsE4AVEDNv3qJsfL64F9/tt3yfQFg== 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=+aRwln AD349ZKJPZR9EtBttwI8J+D4ic4kQRP8VSvSY=; b=JiMPG+p8JPBIREa43oJi+V 2FNBzzVYS8L571oFs/jL0J0a6Q9EriykK6P5yh7y0Qv1C1yRC6wlkRg0E/C1N4ZT hTTz6pMp4Idw+gjguv6xtkEWYiY012F/GD91Mc4D9N5iJr8ONCcIsJQ9Kr/i+ekC v4sExojJpsluUO9vQYLtUc07RGcRIpew8vB1ydm4t2b3OCk0enQXL6R7nrUV0w9E +8gNLYvI1rhm5M/1soZmEh9qd6/TQwG/2IAqSNdocdeLVv7rovKrw6eJF/UefPQM zImZ9To5gK81nOydi/fsuK4NEU0IjNrlhDF//RGm6M4JKcSSC/IisAcvomcaunow == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudehiedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 6D5FE3280059; Thu, 10 Sep 2020 00:37:14 -0400 (EDT) Date: Thu, 10 Sep 2020 13:37:10 +0900 From: Michael Paquier To: Justin Pryzby Cc: k.jamison@fujitsu.com, pgsql-hackers@postgresql.org Subject: Re: please update ps display for recovery checkpoint Message-ID: <20200910043710.GD2743@paquier.xyz> References: <20200818225238.GP17022@telsasoft.com> <20200820080905.GA10353@paquier.xyz> <20200831065244.GB6555@paquier.xyz> <20200910020050.GB18552@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gE7i1rD7pdK0Ng3j" Content-Disposition: inline In-Reply-To: <20200910020050.GB18552@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --gE7i1rD7pdK0Ng3j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 09, 2020 at 09:00:50PM -0500, Justin Pryzby wrote: > What would you want the checkpointer's ps to say ? >=20 > Normally it just says: > postgres 3468 3151 0 Aug27 ? 00:20:57 postgres: checkpointer = =20 Note that CreateCheckPoint() can also be called from the startup process if the bgwriter has not been launched once recovery finishes. > Or do you mean do the same thing as now, but one layer lower, like: > > @@ -8728,6 +8725,9 @@ CreateCheckPoint(int flags) > + if (flags & CHECKPOINT_END_OF_RECOVERY) > + set_ps_display("recovery checkpoint"); For the use-case discussed here, that would be fine. Now the difficult point is how much information we can actually display without bloating ps while still have something meaningful. Showing all the information from LogCheckpointStart() would bloat the output a lot for example. So, thinking about that, my take would be to have ps display the following at the beginning of CreateCheckpoint() and CreateRestartPoint(): - restartpoint or checkpoint - shutdown - end-of-recovery The output also needs to be cleared once the routines finish or if there is a skip, of course. -- Michael --gE7i1rD7pdK0Ng3j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl9ZrXYACgkQnvQgOdby QH2Yfw/+MTkLtOXynwWMxbcHWIYwNpuhgSQXszEl8LAeKkZgStKF2tBEJdby1OMn qbMrDXFH6ik+YgNANau1qjiQJt9n3RcCLNtr7ecgG02ul/p/H6T3tEDnI45hthuG yBOOH7ODYg7tcSz4r6Km1sgrSrELbBaLfwmHfWwnvxCVn4C3dO5AIUs0Fs7vAw2y oGdm5QioFJRN/w2iYkUClTVXRSh3PaAVwECR2z7AJFnsFr03LGCobSKgE2Uw1Ir0 AkAjcO6BwbbRP8czhoMjFCa9A4P0NvMmADjxx9O/5JgY9OwYdMagfzM6It/tvAk4 JPu9j3+VNM7W5jo9SrjlvJcJ2oeDFRQ1NgSCam1tiW/jB7nZunXTxJjcBPFw/Zr7 snchfGplSz+v0PLOQ75bGx/IJvYSIwqG0g5WmTjZpajlkCQYVWF8vQE0VUI9uhR9 3lfvdCdD1diotnNaLERd3TqMaj14ObFvNiyEhB+dIHEuEipVJQh/0gkFYIBSJG8p Ylf5+IOc5kEy6iBxRvuJNKexQNOb6k8XPAh00tfjuswT64YNCQfOBtBTHMW7WxSB 9XSRX0aZIBdvIcINtnSeOj9ub1RfC3JFSiSt9xAux1ND32xE9QTnPLugfKGj/A/v s4WFdoSobnMBwPIbZNp34FzaFnQKmX1PCaXNjKiJXflcBu6mPO8= =igXy -----END PGP SIGNATURE----- --gE7i1rD7pdK0Ng3j--