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 1nHMPE-0004O8-AR for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Feb 2022 09:03: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 1nHMPC-0006vc-B6 for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Feb 2022 09:03: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 1nHMPC-0006vT-1t for pgsql-hackers@lists.postgresql.org; Tue, 08 Feb 2022 09:03:22 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nHMP5-0006en-Oo for pgsql-hackers@lists.postgresql.org; Tue, 08 Feb 2022 09:03:21 +0000 Received: by mail-pl1-x634.google.com with SMTP id k17so13355027plk.0 for ; Tue, 08 Feb 2022 01:03: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=gmJphbTSbNRBuZiaCO87OZmqlNue4W7+ENNmWepwdno=; b=SId5h1z8Wd7hmf2nHqICD8GEOZgtvKtAC1cCPxz/yDfl2cE+kizMS7e7AvWkbvr+/g WVrClFZ9aXoOsMCB6cLTxqZ/6DZiS10KqZYeBeuNxepcsXEFSSI0PSJRhCaOSNB28pC8 7/UiZPR3Wi1uiY4fTnV4wO9t1Ul+MlqoZ3EbCFtZMyqs8vPPXRgkNNQ3iOZuASwhwiF/ 7lgF1O7oZzLxS8U6/Feb6wMi2/KP7l0NSP22r6UuWzjIIrcfChhwbw4Tk4DsuH0w+v6C gFMVNpLjLxCofWqZKiScXcPS3+7AjOqcKTZ9yWQG5u/ixlE/iWky2m9YcnE9hygT4jB3 9DpA== 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=gmJphbTSbNRBuZiaCO87OZmqlNue4W7+ENNmWepwdno=; b=molxp5k4Ms3+rCAdod3V/efJsfMQ0OPP49Z25R57+iCFsJtp1taTMeN5V4OLtZdRKE kADeyAJYObC/zCPjZfzsoGZQMMGXqHEGbDBvDvwjfHLhCKoXpKZc4qhFDk8yHcxvsZqC j/Z9ExP/QG1YrCqFYVK2FHOomHRmaN9IO3zmDK5Stoq+XHjNZ754iPMWKcNT6F80j/BJ dTnODpDPVoqy6zDAtJ9v+YIEM6QhfvRnImjhWJXcLhoK390Bb2PiacDpjSFQdPLUh6Kc 2UZWfxwv6xDW1z3/nwsFPmYLAXokPinF3Pv/IRMoY+UyuHXr0iOHHHGk3r8x1Owobfh5 ooVg== X-Gm-Message-State: AOAM531gh2GPxJvkbRuQg+VEE0IoXoMPueQ7wPFE95ZK1+WStutL/Dyn XVKM/7jlfFjeG8wYgA4mX726xD+tscxOGddK67o= X-Google-Smtp-Source: ABdhPJwnCENgS64VHbyyxoJcok3wtX2/t2Pt7FL2KbBGKRqhWzKBNF+EdzU7Hx97f4i02kh+ml16NlERJHH5SRJBbjI= X-Received: by 2002:a17:90a:ea94:: with SMTP id h20mr221101pjz.199.1644310993069; Tue, 08 Feb 2022 01:03:13 -0800 (PST) MIME-Version: 1.0 References: <20220207.120258.310426179780547983.horikyota.ntt@gmail.com> <20220208.165822.2155503452120234158.horikyota.ntt@gmail.com> <20220208.174029.1890340465677956009.horikyota.ntt@gmail.com> In-Reply-To: <20220208.174029.1890340465677956009.horikyota.ntt@gmail.com> From: Bharath Rupireddy Date: Tue, 8 Feb 2022 14:33:01 +0530 Message-ID: Subject: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message To: Kyotaro Horiguchi Cc: Fujii Masao , Nathan Bossart , Stephen Frost , "Bossart, Nathan" , Julien Rouhaud , Michael Paquier , 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 Tue, Feb 8, 2022 at 2:10 PM Kyotaro Horiguchi wrote: > > Thus.. the attached removes the ambiguity of of the proposed patch > > about the LSNs in the restartpoint-ending log message. > > Thoughts? Thanks for the patch. I have few comments on the v1-0001-Get-rid-of-unused-path-to-handle-concurrent-check.patch 1) Can we have this Assert right after "skipping restartpoint, already performed at %X/%X" error message block? Does it make any difference? My point is that if at all, we were to assert this, why can't we do it before CheckPointGuts? + /* We mustn't have a concurrent checkpoint that advances checkpoint LSN */ + Assert(lastCheckPoint.redo > ControlFile->checkPointCopy.redo); + 2) Related to the above Assert, do we really need an assertion or a FATAL error? 3) Let's be consistent with "crash recovery" - replace "archive-recovery" with "archive recovery"? + * We have exited from archive-recovery mode after this restartpoint + * started. Crash recovery ever after should always recover to the end 4) Isn't it enough to say "Crash recovery should always recover to the end of WAL."? + * started. Crash recovery ever after should always recover to the end 5) Is there a reliable test case covering this code? Please point me if the test case is shared upthread somewhere. 6) So, with this patch, the v8 patch-set posted at [1] doesn't need any changes IIUC. If that's the case, please feel free to post all the patches together such that they get tested in cfbot. [1] - https://www.postgresql.org/message-id/CALj2ACUtZhTb%3D2ENkF3BQ3wi137uaGi__qzvXC-qFYC0XwjALw%40mail.gmail.com Regards, Bharath Rupireddy.