Re: BUG #17744: Fail Assert while recoverying from pg_basebackup - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #17744: Fail Assert while recoverying from pg_basebackup
Date
Msg-id Y/mC37cgUSg7m0hJ@paquier.xyz
Whole thread Raw
In response to Re: BUG #17744: Fail Assert while recoverying from pg_basebackup  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: BUG #17744: Fail Assert while recoverying from pg_basebackup  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-bugs
On Sat, Feb 25, 2023 at 08:56:18AM +1300, Thomas Munro wrote:
> Thanks.  I've been thinking about how to make a deterministic test
> script to study this and possible fixes, too.

I can send you what I have if you are interested, but I would need to
rewrite it a bit as it is integrated with my local scripts.  If you
wish me to test something, just ping me.

> Unfortunately I came
> down with a nasty cold and stopped computing for a couple of days, so
> sorry for the slow response on this thread, but I seem to have
> rebooted now.  Looking.

Ouch, take care.  This has been around for some time, so a couple of
weeks won't matter much.  There is still a lot of time until the next
minor release.

By the way, I think that I have put my finger on something..  The
startup process happily sets InArchiveRecovery to true after
read_backup_label() if finding one, with a comment telling that
archive recovery is requested, still ArchiveRecoveryRequested is never
set to true unless there is a recovery.signal or a standby.signal.

The configuration of this thread fails on that:
@@ -619,6 +619,8 @@ InitWalRecovery(ControlFileData *ControlFile, bool *wasShutdown_ptr,
         * file, we know how far we need to replay to reach consistency. Enter
         * archive recovery directly.
         */
+       if (!ArchiveRecoveryRequested)
+           elog(PANIC, "ArchiveRecoveryRequested not set with backup_label");

One of the tests of 010_pg_basebackup.pl with tablespace maps fails on
that as well, still there does not seem to be a lot of coverage for
self-contained backups..
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: "zhxpgh"
Date:
Subject: two bugs
Next
From: Tomas Vondra
Date:
Subject: Re: two bugs