Re: v12 and TimeLine switches and backups/restores - Mailing list pgsql-hackers

From Robert Haas
Subject Re: v12 and TimeLine switches and backups/restores
Date
Msg-id CA+TgmoYPDxxmYo=r5X8zETN7CL0FSDrUP7wPLy4otUqmZyUJqg@mail.gmail.com
Whole thread Raw
In response to v12 and TimeLine switches and backups/restores  (Stephen Frost <sfrost@snowman.net>)
Responses Re: v12 and TimeLine switches and backups/restores  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Wed, Jul 1, 2020 at 12:12 AM Stephen Frost <sfrost@snowman.net> wrote:
> Among the changes made to PG's recovery in v12 was to set
> recovery_target_timeline to be 'latest' by default.  That's handy when
> you're flipping back and forth between replicas and want to have
> everyone follow that game, but it's made doing some basic things like
> restoring from a backup problematic.
>
> Specifically, if you take a backup off a primary and, while that backup
> is going on, some replica is promoted and drops a .history file into the
> WAL repo, that backup is no longer able to be restored with the new
> recovery_target_timeline default.  What happens is that the restore
> process will happily follow the timeline change- even though it happened
> before we reached consistency, and then it'll never find the needed
> end-of-backup WAL point that would allow us to reach consistency.

Ouch. Should we revert that change rather than doing this? Seems like
this might create a lot of problems for people, and they might be
problems that happen rarely enough that it looks like it's working
until it doesn't. What's the fix, if you hit the error? Add
recovery_target_timeline=<the correct timeline> to
postgresql.auto.conf?

Typo: similairly.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode
Next
From: Robert Haas
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode