You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Integration test improvements for disk and memory efficiency.
Set log-level-file=off when more that one test will run. In this case is it impossible to see the logs anyway since they will be automatically cleaned up after the test. This improves performance pretty dramatically since trace-level logging is expensive. If a singe integration test is run then log-level-file is trace by default but can be changed with the --log-level-test-file option. Reduce buffer-size to 64k to save memory during testing and allow more processes to run in parallel. Update log replacement rules so that these options can change without affecting expect logs.
This commit is contained in:
@@ -70,7 +70,7 @@ full backup - fail on backup lock exists (db-master host)
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
full backup - update during backup (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --buffer-size=16384 --type=full --stanza=db backup
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --buffer-size=[BUFFER-SIZE] --type=full --stanza=db backup
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
|
||||
@@ -81,15 +81,16 @@ pg1-port=6543
|
||||
pg1-socket-path=[TEST_PATH]/db-master/db
|
||||
|
||||
[global]
|
||||
buffer-size=[BUFFER-SIZE]
|
||||
compress=n
|
||||
compress-level=3
|
||||
db-timeout=45
|
||||
lock-path=[TEST_PATH]/db-master/lock
|
||||
log-level-console=detail
|
||||
log-level-file=trace
|
||||
log-level-file=[LOG-LEVEL-FILE]
|
||||
log-level-stderr=off
|
||||
log-path=[TEST_PATH]/db-master/log
|
||||
log-subprocess=y
|
||||
log-subprocess=[LOG-SUBPROCESS]
|
||||
log-timestamp=n
|
||||
protocol-timeout=60
|
||||
repo1-path=[TEST_PATH]/db-master/repo
|
||||
@@ -116,7 +117,7 @@ incr backup - fail on archive_mode=always (db-master host)
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
incr backup - update during backup (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stop-auto --buffer-size=32768 --delta --stanza=db backup
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stop-auto --buffer-size=[BUFFER-SIZE] --delta --stanza=db backup
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
|
||||
@@ -128,15 +129,16 @@ pg1-socket-path=[TEST_PATH]/db-master/db
|
||||
|
||||
[global]
|
||||
archive-async=y
|
||||
buffer-size=[BUFFER-SIZE]
|
||||
compress=n
|
||||
compress-level=3
|
||||
db-timeout=45
|
||||
lock-path=[TEST_PATH]/db-master/lock
|
||||
log-level-console=detail
|
||||
log-level-file=trace
|
||||
log-level-file=[LOG-LEVEL-FILE]
|
||||
log-level-stderr=off
|
||||
log-path=[TEST_PATH]/db-master/log
|
||||
log-subprocess=y
|
||||
log-subprocess=[LOG-SUBPROCESS]
|
||||
log-timestamp=n
|
||||
protocol-timeout=60
|
||||
repo1-path=[TEST_PATH]/db-master/repo
|
||||
@@ -159,13 +161,13 @@ restore, type 'default', expect exit 40 - path not empty (db-master host)
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
restore, type 'default' (db-master host)
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-include=test2 --db-include=test3 --buffer-size=16384 --link-all --stanza=db restore
|
||||
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --db-include=test2 --db-include=test3 --buffer-size=[BUFFER-SIZE] --link-all --stanza=db restore
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
|
||||
----------------------------------------------------------------
|
||||
# Recovery settings generated by pgBackRest restore on [TIMESTAMP]
|
||||
restore_command = '[BACKREST-BIN] --buffer-size=16384 --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
restore_command = '[BACKREST-BIN] --buffer-size=[BUFFER-SIZE] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
|
||||
|
||||
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
|
||||
@@ -262,15 +264,16 @@ pg1-socket-path=[TEST_PATH]/db-master/db
|
||||
|
||||
[global]
|
||||
archive-async=y
|
||||
buffer-size=[BUFFER-SIZE]
|
||||
compress=n
|
||||
compress-level=3
|
||||
db-timeout=45
|
||||
lock-path=[TEST_PATH]/db-master/lock
|
||||
log-level-console=detail
|
||||
log-level-file=trace
|
||||
log-level-file=[LOG-LEVEL-FILE]
|
||||
log-level-stderr=off
|
||||
log-path=[TEST_PATH]/db-master/log
|
||||
log-subprocess=y
|
||||
log-subprocess=[LOG-SUBPROCESS]
|
||||
log-timestamp=n
|
||||
protocol-timeout=60
|
||||
repo1-path=[TEST_PATH]/db-master/repo
|
||||
|
||||
Reference in New Issue
Block a user