From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Eugen Konkov <ekonkov@planitar.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: A question about possible recovery inconsistency
Date: Wed, 11 Oct 2023 09:45:51 +0200
Message-ID: <386a5cbfb38a6cd0c5fd5ed7f0d08154c2cdb49b.camel@cybertec.at> (raw)
In-Reply-To: <CAHKPvkZLN4ow=oFbzUFdGLBNtRdfXwfm97sQYKkYHwL2dJ8d_Q@mail.gmail.com>
References: <CAHKPvkZLN4ow=oFbzUFdGLBNtRdfXwfm97sQYKkYHwL2dJ8d_Q@mail.gmail.com>
On Tue, 2023-10-10 at 11:46 -0400, Eugen Konkov wrote:
> [wants to avoid
> FATAL: recovery ended before configured recovery target was reached
> that is issued in v13 and later]
>
> 1. Why here (in experiment2.txt) redo done at 0/7000028 when recovery
> target name "2023-10-10 15:07:37" is at 0/7000090?
> I suppose 0/7000090 should be included, because
> `recovery_target_inclusive=true` by default.
Because there was no transaction at 0/7000090.
> 2. Is there any way to include a label into a base backup which I can
> use as `recoverty_target_name`?
> This is not clear from documentation
> https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP
> Is 'label' the name for `recovery_target_name` /
> `pg_create_restore_point` is called by `pg_backup_start`?
No.
> 3. Is there any way to get the latest time from a base backup which is
> reachable and could be used as the value for `recovery_target_time`?
> As a workaround for XX000 error I inserted one additional record into
> the database, so a new WAL file is generated. Then I can use the t3
> value for `recovery_target_time`.
> This only works when archive_command/restore_command was configured.
> But without them it seems I can not use the `recovery_target_time`
> option. Is this true?
Perhaps you could use the time from the "backup" file in the WAL archive,
not sure.
But why do you want to do that, if all that you have to do is specify
"recovery_target = 'immediate'" to recover to the end of the backup?
Yours,
Laurenz Albe
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, ekonkov@planitar.com
Subject: Re: A question about possible recovery inconsistency
In-Reply-To: <386a5cbfb38a6cd0c5fd5ed7f0d08154c2cdb49b.camel@cybertec.at>
References: <CAHKPvkZLN4ow=oFbzUFdGLBNtRdfXwfm97sQYKkYHwL2dJ8d_Q@mail.gmail.com> <386a5cbfb38a6cd0c5fd5ed7f0d08154c2cdb49b.camel@cybertec.at>
* 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