AW: broken backup trail in case of quickly patroni switchback and forth

From: "Zwettler Markus (OIZ)" <Markus(dot)Zwettler(at)zuerich(dot)ch>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: AW: broken backup trail in case of quickly patroni switchback and forth
Date: 2019-11-08 11:48:46
Message-ID: eff7e22b23f64c5ebfa3ba0dbea9b7ae@zuerich.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

1) If I got you right this means enabling archiving on both machines (archive_mode=on, archive_command=cp...). Yes?

2) Will the latest transactions on the actual primary be archived (copied from pg_xlog to the local archive_directory) before this primary is reinstated as new standby?

Thanks,
Markus

On Thu, 2019-11-07 at 13:52 +0000, Zwettler Markus (OIZ) wrote:
> we are using Patroni for management of our Postgres standby databases.
>
> we take our (wal) backups on the primary side based on intervals and thresholds.
> our archived wal's are written to a local wal directory first and moved to tape afterwards.
>
> we got a case where Patroni switched back and forth sides quickly, e.g.:
> 12:00h: primary - standby
> 12:05h: standby - primary
> 12:10h: primary - standby
>
> we realised that we will not have a wal backup of those wal's generated between 12:05h and 12:10h in this scenario.
>
> how can we make sure that the whole wal sequence trail will be backuped? any idea?

You'll have to archive WAL from both machines. Then you have everything you should need.

Make sure "recovery_target_timeline = 'latest'" so that recovery will follow the timeline jumps.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2019-11-08 12:40:27 Re: INOUT PARAMETERS WITH RETURN TABLES IN FUNCTION
Previous Message İlyas Derse 2019-11-08 08:18:54 INOUT PARAMETERS WITH RETURN TABLES IN FUNCTION