Re: trying again to get incremental backup
Robert Haas <robertmhaas@gmail.com>
Attachments
- v8-0005-Add-new-pg_walsummary-tool.patch (application/octet-stream) patch v8-0005
- v8-0001-Change-how-a-base-backup-decides-which-files-have.patch (application/octet-stream) patch v8-0001
- v8-0006-Test-patch-Enable-summarize_wal-by-default.patch (application/octet-stream) patch v8-0006
- v8-0003-Add-a-new-WAL-summarizer-process.patch (application/octet-stream) patch v8-0003
- v8-0004-Add-support-for-incremental-backup.patch (application/octet-stream) patch v8-0004
- v8-0002-Move-src-bin-pg_verifybackup-parse_manifest.c-int.patch (application/octet-stream) patch v8-0002
On Mon, Oct 30, 2023 at 2:46 PM Andres Freund <andres@anarazel.de> wrote: > After playing with this for a while, I don't see a reason for wal_summarize_mb > from a memory usage POV at least. Here's v8. Changes: - Replace wal_summarize_mb GUC with summarize_wal = on | off. - Document the summarize_wal and wal_summary_keep_time GUCs. - Refuse to start with summarize_wal = on and wal_level = minimal. - Increase default wal_summary_keep_time to 10d from 7d, per (what I think was) a suggestion from Peter E. - Fix fencepost errors when deciding which WAL summaries are needed for a backup. - Fix indentation damage. - Standardize on ereport(DEBUG1, ...) in walsummarizer.c vs. various more and less chatty things I had before. - Include the timeline in some error messages because not having it proved confusing. - Be more consistent about ignoring the FSM fork. - Fix a bug that could cause WAL summarization to error out when switching timelines. - Fix the division between the wal summarizer and incremental backup patches so that the former passes tests without the latter. - Fix some things that an older compiler didn't like, including adding pg_attribute_printf in some places. - Die with an error instead of crashing if someone feeds us a manifest with no WAL ranges. - Sort the block numbers that need to be read from a relation file before reading them, so that we're certain to read them in ascending order. - Be more careful about computing the truncation_block_length of an incremental file; don't do math on a block number that might be InvalidBlockNumber. - Fix pg_combinebackup so it doesn't fail when zero-filled blocks are added to a relation between the prior backup and the incremental backup. - Improve the pg_combinebackup -d output so that it explains in detail how it's carrying out reconstruction, to improve debuggability. - Disable WAL summarization by default, but add a test patch to the series to enable it, because running the whole test suite with it turned on is good for bug-hunting. - In pg_walsummary, zero a struct before using instead of starting with arbitrary junk values. To do list: - Figure out whether to do something other than uploading the whole summary, per discussion with Jakub Wartak. - Decide what to do about the 60-second waiting-for-WAL-summarization timeout. - Make incremental backup fail quickly if WAL summarization is not even enabled. - Have pg_basebackup error out nicely if an incremental backup is requested from an older server that can't do that. - Add some kind of tests for pg_walsummary. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Minor fixes to pg_combinebackup and its documentation.
- 1713e3d6cd39 17.0 cited
-
Fix defects in PrepareForIncrementalBackup.
- dffde5bf16a5 17.0 landed
-
Add WALSummarizerLock to wait_event_names.txt
- 5c430f9dc559 17.0 landed
-
Initialize variable to placate compiler.
- da083b20f637 17.0 landed
-
Replace nonsense comment with a relevant one.
- ffc6ab9b56ae 17.0 landed
-
Fix numerous typos in incremental backup commits.
- 49f2194ed5c1 17.0 landed
-
Add support for incremental backup.
- dc212340058b 17.0 landed
-
Add a new WAL summarizer process.
- 174c480508ac 17.0 landed
-
Move src/bin/pg_verifybackup/parse_manifest.c into src/common.
- aafc07c7a191 17.0 landed
-
Fix brown paper bag bug in 5c47c6546c413d5eb51c1626070a807026e6139d.
- 47f01d727e3a 17.0 landed
-
Rename pg_verifybackup's JsonManifestParseContext callback functions.
- 278eb13c4823 17.0 landed
-
Rename JsonManifestParseContext callbacks.
- d463aa06a9a8 17.0 landed
-
Change how a base backup decides which files have checksums.
- 025584a168a4 17.0 landed
-
Change struct tablespaceinfo's oid member from 'char *' to 'Oid'
- 5b36e8f078a3 17.0 landed
-
Refactor parse_filename_for_nontemp_relation to parse more.
- 5c47c6546c41 17.0 landed
-
During online checkpoints, insert XLOG_CHECKPOINT_REDO at redo point.
- afd12774ae89 17.0 landed
-
In basebackup.c, refactor to create read_file_data_into_buffer.
- c2ba3fdea593 17.0 landed
-
In basebackup.c, refactor to create verify_page_checksum.
- 053183138a7a 17.0 landed
-
Report syncscan position at end of scan.
- e8d74ad625f7 17.0 cited
-
Exclude additional directories in pg_basebackup
- 6ad8ac602628 10.0 cited
-
Add new JSON processing functions and parser API.
- a570c98d7fa0 9.3.0 cited