Re: Add basic tests for the low-level backup method.

From: David Steele <david(at)pgmasters(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add basic tests for the low-level backup method.
Date: 2024-03-13 20:12:52
Message-ID: f20fcc82-dadb-478d-beb4-1e2ffb0ace76@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/13/24 19:15, Michael Paquier wrote:
> On Wed, Mar 13, 2024 at 01:12:28PM +1300, David Steele wrote:
>>
>> Not sure what to look for here. There are no distinct messages for crash
>> recovery. Perhaps there should be?
>
> The closest thing I can think of here would be "database system was
> not properly shut down; automatic recovery in progress" as we don't
> have InArchiveRecovery, after checking that the canary is missing. If
> you don't like this suggestion, feel free to say so, of course :)

That works for me. I think I got it confused with "database system was
interrupted..." when I was looking at the success vs. fail logs.

>> Sure, I added a check for the new log message when recovering with a
>> backup_label.
>
> +ok($node_replica->log_contains('completed backup recovery with redo LSN'),
> + 'verify backup recovery performed with backup_label');
>
> Okay for this choice. I was thinking first about "starting backup
> recovery with redo LSN", closer to the area where the backup_label is
> read.

I think you are right that the start message is better since it can only
appear once when the backup_label is found. The completed message could
in theory appear after a restart, though the backup_label must have been
found at some point.

Regards,
-David

Attachment Content-Type Size
low-level-backup-test-v3.patch text/plain 5.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2024-03-13 21:12:32 Re: Vectored I/O in bulk_write.c
Previous Message Nathan Bossart 2024-03-13 19:55:25 Re: un-revert the MAINTAIN privilege and the pg_maintain predefined role