pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: how can one infer the maximum possible restore time from a WAL file(name) in a backup?
Date: Mon, 21 Nov 2022 09:31:57 -0500
Message-ID: <3116564.1669041117@sss.pgh.pa.us> (raw)
In-Reply-To: <173875f2fb734d46877eecf55ae0682e@zuerich.ch>
References: <173875f2fb734d46877eecf55ae0682e@zuerich.ch>

"Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch> writes:
> In Oracle there is a view v$archived_log in which for each logfile the time of the first and last transaction contained in it is indicated. By means of this view one can infer from a log file in the backup the maximum possible recovery time.

> Is there something similar in Postgres? Or in other words, how can one infer 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





view thread (2+ messages)

Message-ID: <3116564.1669041117@sss.pgh.pa.us>
Permalink:  ../3116564.1669041117@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3116564.1669041117@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, Markus.Zwettler@zuerich.ch, 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: <3116564.1669041117@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox