You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Add explicit promotes to recovery integration tests.
PostgreSQL 12 will shutdown in these cases which seems to be the correct action (according to the documentation) when hot_standby = off, but older versions are promoting instead. Set target_action explicitly so all versions will behave the same way. This does beg the question of whether the PostgreSQL 12 behavior is wrong (though it matches the docs) or the previous versions are.
This commit is contained in:
@@ -236,20 +236,22 @@ restore, type 'default' (db-master host)
|
||||
----------------------------------------------------------------
|
||||
restore_command = '[BACKREST-BIN] --buffer-size=16384 --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
|
||||
restore, force, backup '[BACKUP-FULL-1]', type 'immediate' (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --force --set=[BACKUP-FULL-1] --type=immediate --link-all --stanza=db restore
|
||||
restore, force, backup '[BACKUP-FULL-1]', type 'immediate', target-action=promote (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --force --set=[BACKUP-FULL-1] --type=immediate --link-all --target-action=promote --stanza=db restore
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
||||
----------------------------------------------------------------
|
||||
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
recovery_target = 'immediate'
|
||||
recovery_target_action = 'promote'
|
||||
|
||||
restore delta, backup '[BACKUP-FULL-1]', type 'time', target '[TIMESTAMP-TARGET-1]' (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-FULL-1] --type=time --target="[TIMESTAMP-TARGET-1]" --link-all --stanza=db restore
|
||||
restore delta, backup '[BACKUP-FULL-1]', type 'time', target '[TIMESTAMP-TARGET-1]', target-action=promote (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-FULL-1] --type=time --target="[TIMESTAMP-TARGET-1]" --link-all --target-action=promote --stanza=db restore
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
||||
----------------------------------------------------------------
|
||||
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
recovery_target_time = '[TIMESTAMP-TARGET-1]'
|
||||
recovery_target_action = 'promote'
|
||||
|
||||
Reference in New Issue
Block a user