mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
4d84820021
Info files required three copies in memory to be loaded (the original string, an ini representation, and the final info object). Not only was this memory inefficient but the Ini object does sequential scans when searching for keys making large files very slow to load. This has not been an issue since archive.info and backup.info are very small, but it becomes a big deal when loading manifests with hundreds of thousands of files. Instead of holding copies of the data in memory, use a callback to deliver the ini data directly to the object when loading. Use a similar method for save to avoid having an intermediate copy. Save is a bit complex because sections/keys must be written in alpha order or older versions of pgBackRest will not calculate the correct checksum. Also move the load retry logic to helper functions rather than embedding it in the Info object. This allows for more flexibility in loading and ensures that stack traces will be available when developing unit tests. Reviewed by Cynthia Shang.
71 lines
4.2 KiB
Plaintext
71 lines
4.2 KiB
Plaintext
run 001 - rmt 0, cmp 0, error version, s3 0, enc 1
|
|
==================================================
|
|
|
|
stanza-create db - create required data for stanza (db-master host)
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --no-online stanza-create
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --db-timeout=45 --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --no-online --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-cipher-pass=<redacted> --repo1-cipher-type=aes-256-cbc --repo1-path=[TEST_PATH]/db-master/repo --stanza=db
|
|
P00 INFO: stanza-create command end: completed successfully
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
|
|
---------------------------------------------------------------------
|
|
[backrest]
|
|
backrest-format=5
|
|
backrest-version="[VERSION-1]"
|
|
|
|
[cipher]
|
|
cipher-pass=[CIPHER-PASS-1]
|
|
|
|
[db]
|
|
db-catalog-version=201409291
|
|
db-control-version=942
|
|
db-id=1
|
|
db-system-id=1000000000000000094
|
|
db-version="9.4"
|
|
|
|
[db:history]
|
|
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":1000000000000000094,"db-version":"9.4"}
|
|
|
|
[backrest]
|
|
backrest-checksum="[CHECKSUM]"
|
|
|
|
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
|
|
-----------------------------------------------------------------------
|
|
[backrest]
|
|
backrest-format=5
|
|
backrest-version="[VERSION-1]"
|
|
|
|
[cipher]
|
|
cipher-pass=[CIPHER-PASS-2]
|
|
|
|
[db]
|
|
db-id=1
|
|
db-system-id=1000000000000000094
|
|
db-version="9.4"
|
|
|
|
[db:history]
|
|
1={"db-id":1000000000000000094,"db-version":"9.4"}
|
|
|
|
[backrest]
|
|
backrest-checksum="[CHECKSUM]"
|
|
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-push-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-push-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000002
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
P00 ERROR: [044]: PostgreSQL version 9.4, system-id 1000000000000000094 do not match stanza version 8.0, system-id 1000000000000000094
|
|
HINT: are you archiving to the correct stanza?
|
|
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-push-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000003
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
P00 ERROR: [044]: PostgreSQL version 9.4, system-id 1000000000000000094 do not match stanza version 8.0, system-id 1000000000000000094
|
|
HINT: are you archiving to the correct stanza?
|
|
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-push-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000004 --repo1-host=bogus
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
P00 WARN: dropped WAL file '000000010000000100000004' because archive queue exceeded 32MB
|
|
|
|
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-push-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000005
|
|
------------------------------------------------------------------------------------------------------------------------------------
|