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 1nEk2G-0002lY-EH for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 03:40:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nEk2F-0004TL-Az for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Feb 2022 03:40:51 +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 1nEk2F-0004TC-1y for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 03:40:51 +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 1nEk2C-0003fR-4s for pgsql-hackers@lists.postgresql.org; Tue, 01 Feb 2022 03:40:50 +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 542086060A; Tue, 1 Feb 2022 12:40:42 +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 12:40:41 +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: Nathan Bossart , Bharath Rupireddy Cc: 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: <20220201014435.GA738413@nathanxps13> 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 10:44, Nathan Bossart wrote: > On Tue, Feb 01, 2022 at 12:23:10AM +0530, Bharath Rupireddy wrote: >> On Tue, Feb 1, 2022 at 12:00 AM Nathan Bossart wrote: >>> I think the pg_controldata change needs some extra spaces for alignment, >>> but otherwise these patches seem reasonable to me. >> >> Thanks. My bad it was. Changed in v6. - (errmsg("restartpoint complete: wrote %d buffers (%.1f%%); " + (errmsg("restartpoint complete: lsn=%X/%X, redo lsn=%X/%X; " + "wrote %d buffers (%.1f%%); " "%d WAL file(s) added, %d removed, %d recycled; " "write=%ld.%03d s, sync=%ld.%03d s, total=%ld.%03d s; " "sync files=%d, longest=%ld.%03d s, average=%ld.%03d s; " "distance=%d kB, estimate=%d kB", + LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo), + LSN_FORMAT_ARGS(ControlFile->checkPoint), The order of arguments for LSN seems wrong. LSN_FORMAT_ARGS(ControlFile->checkPoint) should be specified ahead of LSN_FORMAT_ARGS(ControlFile->checkPointCopy.redo)? 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. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION