On Thu, Feb 29, 2024 at 10:30:52AM +1300, David Steele wrote: > On 11/12/23 08:21, David Steele wrote: >> As promised in [1], attached are some basic tests for the low-level >> backup method. > > Added to the 2024-03 CF.
There is already 040_standby_failover_slots_sync.pl in recovery/ that uses the number of your test script. You may want to bump it, that's a nit. +unlink("$backup_dir/postmaster.pid") + or BAIL_OUT("unable to unlink $backup_dir/postmaster.pid"); +unlink("$backup_dir/postmaster.opts") + or BAIL_OUT("unable to unlink $backup_dir/postmaster.opts"); +unlink("$backup_dir/global/pg_control") + or BAIL_OUT("unable to unlink $backup_dir/global/pg_control"); RELCACHE_INIT_FILENAME as well? +# Rather than writing out backup_label, try to recover the backup without +# backup_label to demonstrate that recovery will not work correctly without it, +# i.e. the canary table will be missing and the cluster will be corrupt. Provide +# only the WAL segment that recovery will think it needs. Okay, why not. No objections to this addition. I am a bit surprised that this is not scanning some of the logs produced by the startup process for particular patterns. +# Save backup_label into the backup directory and recover using the primary's +# archive. This time recovery will succeed and the canary table will be +# present. Here are well, I think that we should add some log_contains() with pre-defined patterns to show that recovery has completed the way we want it with a backup_label up to the end-of-backup record. -- Michael
signature.asc
Description: PGP signature