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 1n0jcW-0002US-9x for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Dec 2021 12:24:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n0jcU-00087S-4d for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Dec 2021 12:24:22 +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 1n0jcT-00085u-PH for pgsql-hackers@lists.postgresql.org; Fri, 24 Dec 2021 12:24:21 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n0jcN-0007Xp-A4 for pgsql-hackers@lists.postgresql.org; Fri, 24 Dec 2021 12:24:21 +0000 Received: by mail-pl1-x630.google.com with SMTP id c7so6558331plg.5 for ; Fri, 24 Dec 2021 04:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mec22bqjhJoyqTDovhMlOz6FaG83tgh6mxQ8ft8SJyI=; b=X32KrOhZrAQT6pI8T6NEv1KjXUt+SUzBtoCyvEhzB36O4tANhfry/GuMwX0AOtwsCT QqaDyT9BcvV3e2rg+l5zbfewq/qNoSz0nJ3bT6bKelNqRCYOz0HgnFiaAKDbmMzKEBHb TazAenMrm41duluvqaNo4lzyjt49imcqxI2rjW7U6+mR39RKLShX1nEqEBq/YLWXD35w sL+XCftl2zMoLPJ/27uVXlbLAiZ1qF3FyP/JajbXSMMHZUbCd3rPDK1u5vxOK3O/pF7Q J8AUhpouZNgjvTzNANpDTdn8jVO5Vcxo51DLuAYSXu2v9UCUwWrjsJaJ7S7tqusKZlI/ m6Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mec22bqjhJoyqTDovhMlOz6FaG83tgh6mxQ8ft8SJyI=; b=bK3bq0k+60zuMb2MRNWkN0Dhx0bxBzdBlSBLV0TkiVX4P5D8UdlaYkdlYGH7MPTy7/ 0I5kUyu+xcNw06n6gcVe1mRLjzbIIi3TAmbyqFexQpSbvioaNug5H5S3Q/PZyU7MFs6w 8idsd13M5Ruz4/U1Ab7sjE1w4Lr3npBOlKGl7h2Ef87NIkjeFS8yRWFztydxj1fEXC7S +OHpXI/XAi+pThVj2+1ShZ8kfwMd4PDA5N8sanK4Xd3HsVKONEeT0/v8JJgEDBEJUTEG A9/ucYoEJRcpHYF8+6PbMaYnmt7NVLv+VG3p1l4V42BNLlw42+UXTz8eDMB0QGZ3SNWZ rtEQ== X-Gm-Message-State: AOAM533CfVyyy1eJl5CfrqR005GlLsyItDGNo/zCdUMK/oMK5jC6VMAh rT9dbDYtBpfU7hJOM4bWZflj/ao58QgBoHls3Vc= X-Google-Smtp-Source: ABdhPJzU8wDU6m1tFUbOWdstT138cXqReWv9BhRBpsuM1gkAHb2vc1g0MlYtDmO6xs5rmbC/58OUD3fHIKTZqXc6vvY= X-Received: by 2002:a17:90b:1d07:: with SMTP id on7mr7976979pjb.177.1640348653318; Fri, 24 Dec 2021 04:24:13 -0800 (PST) MIME-Version: 1.0 References: <20211224.145134.1164706994861031206.horikyota.ntt@gmail.com> In-Reply-To: From: Bharath Rupireddy Date: Fri, 24 Dec 2021 17:54:02 +0530 Message-ID: Subject: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message To: Michael Paquier Cc: Kyotaro Horiguchi , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 24, 2021 at 5:42 PM Michael Paquier wrote: > > On Fri, Dec 24, 2021 at 02:51:34PM +0900, Kyotaro Horiguchi wrote: > > I thougt about something like the following, but your proposal may be > > clearer. > > + "LSN=%X/%X, REDO LSN=%X/%X", > This could be rather confusing for the average user, even if I agree > that this is some information that only an advanced user could > understand. Could it be possible to define those fields in a more > deterministic way? For one, it is hard to understand the relationship > between both fields without looking at the code, particulary if both > share the same value. It is at least rather.. Well, mostly, easy to > guess what each other field means in this context, which is not the > case of what you are proposing here. One idea could be use also > "start point" for REDO, for example. How about "location=%X/%X, REDO start location=%X/%X"? The entire log message can look like below: 2021-12-24 12:20:19.140 UTC [1977834] LOG: checkpoint complete:location=%X/%X, REDO start location=%X/%X; wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.005 s, sync=0.007 s, total=0.192 s; sync files=5, longest=0.005 s, average=0.002 s; distance=293 kB, estimate=56584 kB Another variant: 2021-12-24 12:20:19.140 UTC [1977834] LOG: checkpoint completed at location=%X/%X with REDO start location=%X/%X: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.005 s, sync=0.007 s, total=0.192 s; sync files=5, longest=0.005 s, average=0.002 s; distance=293 kB, estimate=56584 kB 2021-12-24 12:20:19.140 UTC [1977834] LOG: restartpoint completed at location=%X/%X with REDO start location=%X/%X: wrote 7 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.005 s, sync=0.007 s, total=0.192 s; sync files=5, longest=0.005 s, average=0.002 s; distance=293 kB, estimate=56584 kB Thoughts? Regards, Bharath Rupireddy.