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 1pHnxL-0002LM-SL for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jan 2023 15:32:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pHnxK-0002Mt-9c for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jan 2023 15:32:58 +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 1pHnxK-0002Me-0B for pgsql-hackers@lists.postgresql.org; Tue, 17 Jan 2023 15:32:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHnxH-0005c3-KF for pgsql-hackers@postgresql.org; Tue, 17 Jan 2023 15:32:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30HFWod32964582; Tue, 17 Jan 2023 10:32:50 -0500 From: Tom Lane To: Laurenz Albe cc: Torsten =?ISO-8859-1?Q?F=F6rtsch?= , pgsql-hackers@postgresql.org, Michael Paquier Subject: Re: minor bug In-reply-to: References: Comments: In-reply-to Laurenz Albe message dated "Tue, 17 Jan 2023 10:42:03 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2964580.1673969570.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 17 Jan 2023 10:32:50 -0500 Message-ID: <2964581.1673969570@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Laurenz Albe writes: > On Mon, 2023-01-16 at 19:59 +0100, Torsten Förtsch wrote: >> So, the timestamp displayed in the log message is certainly wrong. > If recovery stops at a WAL record that has no timestamp, you get this > bogus recovery stop time. I think we should show the recovery stop time > only if time was the target, as in the attached patch. I don't think that is a tremendously useful definition: the user already knows what recoveryStopTime is, or can find it out from their settings easily enough. I seem to recall that the original idea was to report the timestamp of the commit/abort record we are stopping at. Maybe my memory is faulty, but I think that'd be significantly more useful than the current behavior, *especially* when the replay stopping point is defined by something other than time. (Also, the wording of the log message suggests that that's what the reported time is supposed to be. I wonder if somebody messed this up somewhere along the way.) regards, tom lane