backup manifests
Robert Haas <robertmhaas@gmail.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
In the lengthy thread on block-level incremental backup,[1] both Vignesh C[2] and Stephen Frost[3] have suggested storing a manifest as part of each backup, somethig that could be useful not only for incremental backups but also for full backups. I initially didn't think this was necessary,[4] but some of my colleagues figured out that my design was broken, because my proposal was to detect new blocks just using LSN, and that ignores the fact that CREATE DATABASE and ALTER TABLE .. SET TABLESPACE do physical copies without bumping page LSNs, which I knew but somehow forgot about. Fortunately, some of my colleagues realized my mistake in testing.[5] Because of this problem, for an LSN-based approach to work, we'll need to send not only an LSN, but also a list of files (and file sizes) that exist in the previous full backup; so, some kind of backup manifest now seems like a good idea to me.[6] That whole approach might still be dead on arrival if it's possible to add new blocks with old LSNs to existing files,[7] but there seems to be room to hope that there are no such cases.[8] So, let's suppose we invent a backup manifest. What should it contain? I imagine that it would consist of a list of files, and the lengths of those files, and a checksum for each file. I think you should have a choice of what kind of checksums to use, because algorithms that used to seem like good choices (e.g. MD5) no longer do; this trend can probably be expected to continue. Even if we initially support only one kind of checksum -- presumably SHA-something since we have code for that already for SCRAM -- I think that it would also be a good idea to allow for future changes. And maybe it's best to just allow a choice of SHA-224, SHA-256, SHA-384, and SHA-512 right out of the gate, so that we can avoid bikeshedding over which one is secure enough. I guess we'll still have to argue about the default. I also think that it should be possible to build a manifest with no checksums, so that one need not pay the overhead of computing checksums if one does not wish. Of course, such a manifest is of much less utility for checking backup integrity, but you can still check that you've got the right files, which is noticeably better than nothing. The manifest should probably also contain a checksum of its own contents so that the integrity of the manifest itself can be verified. And maybe a few other bits of metadata, but I'm not sure exactly what. Ideas? Once we invent the concept of a backup manifest, what do we need to do with them? I think we'd want three things initially: (1) When taking a backup, have the option (perhaps enabled by default) to include a backup manifest. (2) Given an existing backup that has not got a manifest, construct one. (3) Cross-check a manifest against a backup and complain about extra files, missing files, size differences, or checksum mismatches. One thing I'm not quite sure about is where to store the backup manifest. If you take a base backup in tar format, you get base.tar, pg_wal.tar (unless -Xnone), and an additional tar file per tablespace. Does the backup manifest go into base.tar? Get written into a separate file outside of any tar archive? Something else? And what about a plain-format backup? I suppose then we should just write the manifest into the top level of the main data directory, but perhaps someone has another idea. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company [1] https://www.postgresql.org/message-id/flat/CA%2BTgmoYxQLL%3DmVyN90HZgH0X_EUrw%2BaZ0xsXJk7XV3-3LygTvA%40mail.gmail.com [2] https://www.postgresql.org/message-id/CALDaNm310fUZ72nM2n%3DcD0eSHKRAoJPuCyvvR0dhTEZ9Oytyzg%40mail.gmail.com [3] https://www.postgresql.org/message-id/20190916143817.GA6962%40tamriel.snowman.net [4] https://www.postgresql.org/message-id/CA%2BTgmoaj-zw4Mou4YBcJSkHmQM%2BJA-dAVJnRP8zSASP1S4ZVgw%40mail.gmail.com [5] https://www.postgresql.org/message-id/CAM2%2B6%3DXfJX%3DKXvpTgDvgd1rQjya_Am27j4UvJtL3nA%2BJMCTGVQ%40mail.gmail.com [6] https://www.postgresql.org/message-id/CA%2BTgmoYg9i8TZhyjf8MqCyU8unUVuW%2B03FeBF1LGDu_-eOONag%40mail.gmail.com [7] https://www.postgresql.org/message-id/CA%2BTgmoYT9xODgEB6y6j93hFHqobVcdiRCRCp0dHh%2BfFzZALn%3Dw%40mail.gmail.com and nearby messages [8] https://www.postgresql.org/message-id/20190916173933.GE6962%40tamriel.snowman.net