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 1nEke2-0004Kk-Gf for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 04:19:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nEke0-0000DB-HW for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 04:19:52 +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 1nEke0-0000Cd-88 for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 04:19:52 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nEkdv-0003zO-VV for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 04:19:49 +0000 Received: from [192.168.11.9] (p2019072-ipbf2307funabasi.chiba.ocn.ne.jp [122.30.130.72]) by oss.nttdata.com (Postfix) with ESMTPSA id 4748561019; Tue, 1 Feb 2022 13:19:44 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.5 at oss.nttdata.com Message-ID: Date: Tue, 1 Feb 2022 13:19:43 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message Content-Language: en-US To: Bharath Rupireddy Cc: Nathan Bossart , Stephen Frost , Kyotaro Horiguchi , "Bossart, Nathan" , Julien Rouhaud , Michael Paquier , PostgreSQL Hackers References: <20220120.120029.1092463916382268628.horikyota.ntt@gmail.com> <20220128054620.GA654866@nathanxps13> <20220131151100.GR10577@tamriel.snowman.net> <20220131183009.GA660545@nathanxps13> <20220201014435.GA738413@nathanxps13> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022/02/01 13:01, Bharath Rupireddy wrote: > On Tue, Feb 1, 2022 at 9:10 AM Fujii Masao wrote: >> The order of arguments for LSN seems wrong. LSN_FORMAT_ARGS(ControlFile->checkPoint) should be specified ahead of LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo)? > > Thanks. Corrected. Thanks! >> Could you tell me why the information for LSN is reported earlierly in the log message? Since ordinally users would be more interested in the information about I/O by checkpoint, the information for LSN should be placed later? Sorry if this was already discussed. > > It is useful (for debugging purposes) if the checkpoint end message > has the checkpoint LSN(end) and REDO LSN(start). It gives more context > while analyzing checkpoint-related issues. The pg_controldata gives > the last checkpoint LSN and REDO LSN, but having this info alongside > the log message helps analyze issues that happened previously, connect > the dots and identify the root cause. My previous comment was confusing... Probably I understand why you tried to put this information in checkpoint log message. But I was suggesting to put that information at the end of log message instead of the beginning of it. Because ordinary users would be less interested in this LSN information than other ones like the number of buffers written. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION