Re: v12 and TimeLine switches and backups/restores

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: v12 and TimeLine switches and backups/restores
Date: 2020-07-01 19:51:39
Message-ID: CA+TgmoYPDxxmYo=r5X8zETN7CL0FSDrUP7wPLy4otUqmZyUJqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 1, 2020 at 12:12 AM Stephen Frost <sfrost(at)snowman(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-07-01 19:58:57 Re: Remove Deprecated Exclusive Backup Mode
Previous Message Stephen Frost 2020-07-01 19:50:41 Re: Remove Deprecated Exclusive Backup Mode