From: Lorenz, Christopher <Christopher.Lorenz@ZIT-BB.Brandenburg.de>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: AW: BUG #17393: Delete database after recovery with point-in-time is still missing datafiles
Date: Wed, 30 Mar 2022 11:49:49 +0000
Message-ID: <b794d37a253944cf977d405ac579c233@ZIT-BB.Brandenburg.de> (raw)
In-Reply-To: <20220306074134.pmdoskylyxxjhkmb@jrouhaud>
References: <17393-fe5b19a5eb16cf7f@postgresql.org>
<20220306074134.pmdoskylyxxjhkmb@jrouhaud>
Hello,
I created a script which do the complete procedure of create database backup and reproduce the bug while recovery.
I created this used by rpm from official postgresql yum repo. I used a RedHat 7 OS. I also add the output of the script.
You need to set your path to binary in the script: Line 9 pg_bin, as described before I also can reproduce this behavior in Versions 12 to 14
The line with the wrong stop in bug report seams to be a copy&paste error and was done correctly.
The WAL recovery is done by recovery_command which restores all previous saved files. In the log you can see that the WAL files are used for recovery:
2022-03-29 10:30:19.686 CEST [15169] LOG: restored log file "000000010000000000000003" from archive
2022-03-29 10:30:19.727 CEST [15169] LOG: recovery stopping before commit of transaction 486, time 2022-03-29 10:30:08.739965+02
2022-03-29 10:30:19.727 CEST [15169] LOG: pausing at the end of recovery
Regards,
Christopher Lorenz
-----Ursprüngliche Nachricht-----
Von: Julien Rouhaud <rjuju123@gmail.com>
Gesendet: Sonntag, 6. März 2022 08:42
An: Lorenz, Christopher <Christopher.Lorenz@ZIT-BB.Brandenburg.de>; pgsql-bugs@lists.postgresql.org
Betreff: Re: BUG #17393: Delete database after recovery with point-in-time is still missing datafiles
...
I can't reproduce the problem. Now, given what you seem to be using, this is
likely an operator error:
...
> pg_ctl -D $PGDATAstop
this won't stop the instance. If that's what you're really doing it's clearly
going to be broken.
...
no WAL recovery?
I recommend reading
https://www.postgresql.org/docs/current/continuous-archiving.html to see what
are the correct steps to restore a PITR backup, and if you still have a problem
please show a script that is self contained (ie. provide all parameter
initialization), safe, and actually works.
Attachments:
base_recovery.log (application/octet-stream, 8.4K) download
base_recovery.sh (application/octet-stream, 3.7K) download
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-bugs@postgresql.org
Cc: Christopher.Lorenz@ZIT-BB.Brandenburg.de
Subject: Re: BUG #17393: Delete database after recovery with point-in-time is still missing datafiles
In-Reply-To: <b794d37a253944cf977d405ac579c233@ZIT-BB.Brandenburg.de>
References: <17393-fe5b19a5eb16cf7f@postgresql.org> <20220306074134.pmdoskylyxxjhkmb@jrouhaud> <b794d37a253944cf977d405ac579c233@ZIT-BB.Brandenburg.de>
* 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