Re: trying again to get incremental backup
Robert Haas <robertmhaas@gmail.com>
Attachments
- v16-0003-Add-new-pg_walsummary-tool.patch (application/octet-stream) patch v16-0003
- v16-0001-Add-a-new-WAL-summarizer-process.patch (application/octet-stream) patch v16-0001
- v16-0004-Test-patch-Enable-summarize_wal-by-default.patch (application/octet-stream) patch v16-0004
- v16-0002-Add-support-for-incremental-backup.patch (application/octet-stream) patch v16-0002
On Fri, Dec 15, 2023 at 5:36 AM Jakub Wartak <jakub.wartak@enterprisedb.com> wrote: > I've played with with initdb/pg_upgrade (17->17) and i don't get DBID > mismatch (of course they do differ after initdb), but i get this > instead: > > $ pg_basebackup -c fast -D /tmp/incr2.after.upgrade -p 5432 > --incremental /tmp/incr1.before.upgrade/backup_manifest > WARNING: aborting backup due to backend exiting before pg_backup_stop > was called > pg_basebackup: error: could not initiate base backup: ERROR: timeline > 2 found in manifest, but not in this server's history > pg_basebackup: removing data directory "/tmp/incr2.after.upgrade" > > Also in the manifest I don't see DBID ? > Maybe it's a nuisance and all I'm trying to see is that if an > automated cronjob with pg_basebackup --incremental hits a freshly > upgraded cluster, that error message without errhint() is going to > scare some Junior DBAs. Yeah. I think we should add the system identifier to the manifest, but I think that should be left for a future project, as I don't think the lack of it is a good reason to stop all progress here. When we have that, we can give more reliable error messages about system mismatches at an earlier stage. Unfortunately, I don't think that the timeline messages you're seeing here are going to apply in every case: suppose you have two unrelated servers that are both on timeline 1. I think you could use a base backup from one of those servers and use it as the basis for the incremental from the other, and I think that if you did it right you might fail to hit any sanity check that would block that. pg_combinebackup will realize there's a problem, because it has the whole cluster to work with, not just the manifest, and will notice the mismatching system identifiers, but that's kind of late to find out that you made a big mistake. However, right now, it's the best we can do. > The incrementals are being generated , but just for the first (0) > segment of the relation? I committed the first two patches from the series I posted yesterday. The first should fix this, and the second relocates parse_manifest.c. That patch hasn't changed in a while and seems unlikely to attract major objections. There's no real reason to commit it until we're ready to move forward with the main patches, but I think we're very close to that now, so I did. Here's a rebase for cfbot. -- 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