On Wed, Dec 13, 2023 at 5:39 AM Jakub Wartak <jakub.war...@enterprisedb.com> wrote: > > I can't exactly say that such a hint would be inaccurate, but I think > > the impulse to add it here is misguided. One of my design goals for > > this system is to make it so that you never have to take a new > > incremental backup "just because," > > Did you mean take a new full backup here?
Yes, apologies for the typo. > > not even in case of an intervening > > timeline switch. So, all of the errors in this function are warning > > you that you've done something that you really should not have done. > > In this particular case, you've either (1) manually removed the > > timeline history file, and not just any timeline history file but the > > one for a timeline for a backup that you still intend to use as the > > basis for taking an incremental backup or (2) tried to use a full > > backup taken from one server as the basis for an incremental backup on > > a completely different server that happens to share the same system > > identifier, e.g. because you promoted two standbys derived from the > > same original primary and then tried to use a full backup taken on one > > as the basis for an incremental backup taken on the other. > > > > Okay, but please consider two other possibilities: > > (3) I had a corrupted DB where I've fixed it by running pg_resetwal > and some cronjob just a day later attempted to take incremental and > failed with that error. > > (4) I had pg_upgraded (which calls pg_resetwal on fresh initdb > directory) the DB where I had cronjob that just failed with this error > > I bet that (4) is going to happen more often than (1), (2) , which > might trigger users to complain on forums, support tickets. Hmm. In case (4), I was thinking that you'd get a complaint about the database system identifier not matching. I'm not actually sure that's what would happen, though, now that you mention it. In case (3), I think you would get an error about missing WAL summary files. > > Huzzah, the cfbot likes the patch set now. Here's a new version with > > the promised fix for your non-reproducible issue. Let's see whether > > you and cfbot still like this version. > > LGTM, all quick tests work from my end too. BTW: I have also scheduled > the long/large pgbench -s 14000 (~200GB?) - multiple day incremental > test. I'll let you know how it went. Awesome, thank you so much. -- Robert Haas EDB: http://www.enterprisedb.com