Re: backup manifests
Suraj Kharage <suraj.kharage@enterprisedb.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Try to avoid compiler warnings in optimized builds.
- 05021a2c0cd2 13.0 landed
-
Fix option related issues in pg_verifybackup.
- 0a89e93bfaa6 13.0 landed
-
Add index term for backup manifest in documentation.
- 4db819ba4039 13.0 landed
-
Code review for backup manifest.
- a2ac73e7be7a 13.0 landed
-
Document the backup manifest file format.
- 149f2ae88ab0 13.0 landed
-
Fix typo in pg_validatebackup documentation.
- c4f82a779d26 13.0 landed
-
Exclude backup_manifest file that existed in database, from BASE_BACKUP.
- 1ec50a81ec0a 13.0 landed
-
Msys2 tweaks for pg_validatebackup corruption test
- c3e4cbaab936 13.0 landed
-
Fix resource management bug with replication=database.
- 3e0d80fd8d3d 13.0 cited
-
Be more careful about time_t vs. pg_time_t in basebackup.c.
- db1531cae009 13.0 cited
-
pg_validatebackup: Fix 'make clean' to remove tmp_check.
- 9f8f881caa0f 13.0 landed
-
pg_validatebackup: Also use perl2host in TAP tests.
- 460314db08e8 13.0 landed
-
Generate backup manifests for base backups, and validate them.
- 0d8c9c1210c4 13.0 landed
-
Add checksum helper functions.
- c12e43a2e0d4 13.0 landed
-
pg_waldump: Add a --quiet option.
- ac44367efbef 13.0 landed
-
Catversion bump for b9b408c48724
- afb5465e0cfc 13.0 cited
-
pg_basebackup: Refactor code for reading COPY and tar data.
- 431ba7bebf13 13.0 landed
-
Use a ResourceOwner to track buffer pins in all cases.
- 3cb646264e8c 12.0 cited
-
Use ARMv8 CRC instructions where available.
- f044d71e331d 11.0 cited
-
Logical replication support for initial data copy
- 7c4f52409a8c 10.0 cited
-
Use Intel SSE 4.2 CRC instructions where available.
- 3dc2d62d0486 9.5.0 cited
-
Switch to CRC-32C in WAL and other places.
- 5028f22f6eb0 9.5.0 cited
-
Remove support for 64-bit CRC.
- 404bc51cde9d 9.5.0 cited
-
Change CRCs in WAL records from 64bit to 32bit for performance reasons.
- 21fda22ec46d 8.1.0 cited
Attachments
- backup_validator_POC.patch (application/octet-stream) patch
Hi, Since now we are generating the backup manifest file with each backup, it provides us an option to validate the given backup. Let's say, we have taken a backup and after a few days, we want to check whether that backup is validated or corruption-free without restarting the server. Please find attached POC patch for same which will be based on the latest backup manifest patch from Rushabh. With this functionality, we add new option to pg_basebackup, something like --verify-backup. So, the syntax would be: ./bin/pg_basebackup --verify-backup -D <backup_directory_path> Basically, we read the backup_manifest file line by line from the given directory path and build the hash table, then scan the directory and compare each file with the hash entry. Thoughts/suggestions? On Tue, Nov 19, 2019 at 3:30 PM Rushabh Lathia <rushabh.lathia@gmail.com> wrote: > > > My colleague Suraj did testing and noticed the performance impact > with the checksums. On further testing, he found that specifically with > sha its more of performance impact. > > Please find below statistics: > > no of tables without checksum SHA256 > checksum % performnce > overhead > with > SHA-256 md5 checksum % performnce > overhead with md5 CRC checksum % performnce > overhead with > CRC > 10 (100 MB > in each table) real 0m10.957s > user 0m0.367s > sys 0m2.275s real 0m16.816s > user 0m0.210s > sys 0m2.067s 53% real 0m11.895s > user 0m0.174s > sys 0m1.725s 8% real 0m11.136s > user 0m0.365s > sys 0m2.298s 2% > 20 (100 MB > in each table) real 0m20.610s > user 0m0.484s > sys 0m3.198s real 0m31.745s > user 0m0.569s > sys 0m4.089s > 54% real 0m22.717s > user 0m0.638s > sys 0m4.026s 10% real 0m21.075s > user 0m0.538s > sys 0m3.417s 2% > 50 (100 MB > in each table) real 0m49.143s > user 0m1.646s > sys 0m8.499s real 1m13.683s > user 0m1.305s > sys 0m10.541s 50% real 0m51.856s > user 0m0.932s > sys 0m7.702s 6% real 0m49.689s > user 0m1.028s > sys 0m6.921s 1% > 100 (100 MB > in each table) real 1m34.308s > user 0m2.265s > sys 0m14.717s real 2m22.403s > user 0m2.613s > sys 0m20.776s 51% real 1m41.524s > user 0m2.158s > sys 0m15.949s > 8% real 1m35.045s > user 0m2.061s > sys 0m16.308s 1% > 100 (1 GB > in each table) real 17m18.336s > user 0m20.222s > sys 3m12.960s real 24m45.942s > user 0m26.911s > sys 3m33.501s 43% real 17m41.670s > user 0m26.506s > sys 3m18.402s 2% real 17m22.296s > user 0m26.811s > sys 3m56.653s > > sometimes, this test > completes within the > same time as without > checksum. approx. 0.5% > > > Considering the above results, I modified the earlier Robert's patch and > added > "manifest_with_checksums" option to pg_basebackup. With a new patch. > by default, checksums will be disabled and will be only enabled when > "manifest_with_checksums" option is provided. Also re-based all patch set. > > > > Regards, > > -- > Rushabh Lathia > www.EnterpriseDB.com > > On Tue, Oct 1, 2019 at 5:43 PM Robert Haas <robertmhaas@gmail.com> wrote: > >> On Mon, Sep 30, 2019 at 5:31 AM Jeevan Chalke >> <jeevan.chalke@enterprisedb.com> wrote: >> > Entry for directory is not added in manifest. So it might be difficult >> > at client to get to know about the directories. Will it be good to add >> > an entry for each directory too? May be like: >> > Dir <dirname> <mtime> >> >> Well, what kind of corruption would this allow us to detect that we >> can't detect as things stand? I think the only case is an empty >> directory. If it's not empty, we'd have some entries for the files in >> that directory, and those files won't be able to exist unless the >> directory does. But, how would we end up backing up an empty >> directory, anyway? >> >> I don't really *mind* adding directories into the manifest, but I'm >> not sure how much it helps. >> >> -- >> Robert Haas >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> >> > > -- > Rushabh Lathia > -- -- Thanks & Regards, Suraj kharage, EnterpriseDB Corporation, The Postgres Database Company.