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 1ox7q7-0005Lq-66 for pgsql-admin@arkaria.postgresql.org; Mon, 21 Nov 2022 14:32:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ox7q6-0007vJ-4P for pgsql-admin@arkaria.postgresql.org; Mon, 21 Nov 2022 14:32:02 +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 1ox7q5-0007v9-QO for pgsql-admin@lists.postgresql.org; Mon, 21 Nov 2022 14:32:01 +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 1ox7q3-0005iT-Ld for pgsql-admin@lists.postgresql.org; Mon, 21 Nov 2022 14:32:01 +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 2ALEVvlV3116565; Mon, 21 Nov 2022 09:31:57 -0500 From: Tom Lane To: "Zwettler Markus (OIZ)" cc: "pgsql-admin@lists.postgresql.org" Subject: Re: how can one infer the maximum possible restore time from a WAL file(name) in a backup? In-reply-to: <173875f2fb734d46877eecf55ae0682e@zuerich.ch> References: <173875f2fb734d46877eecf55ae0682e@zuerich.ch> Comments: In-reply-to "Zwettler Markus (OIZ)" message dated "Mon, 21 Nov 2022 12:45:10 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3116563.1669041117.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 21 Nov 2022 09:31:57 -0500 Message-ID: <3116564.1669041117@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Zwettler Markus (OIZ)" writes: > In Oracle there is a view v$archived_log in which for each logfile the t= ime of the first and last transaction contained in it is indicated. By mea= ns of this view one can infer from a log file in the backup the maximum po= ssible recovery time. > Is there something similar in Postgres? Or in other words, how can one i= nfer the maximum possible restore time from a WAL file(name) in a backup? There's no view, but you could use pg_waldump to examine the timestamps of the first and last COMMIT/ROLLBACK records in a WAL file. regards, tom lane