Re: [HACKERS] Creating backup history files for backups taken from standbys - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Creating backup history files for backups taken from standbys
Date
Msg-id CAB7nPqTL+LSE1A0t6HyRh_v4YOEcUmM8ZWT+grD9pYmcL9NhXA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Creating backup history files for backups taken from standbys  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [HACKERS] Creating backup history files for backups taken fromstandbys
List pgsql-hackers
On Fri, Jan 5, 2018 at 11:27 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> I'm not.
>
> If we want to do this why not only do it in the modes that have meaning?
> i.e. put an if() test in for archive_mode == always.

OK, I can see value in your point as well. The check is a bit more
complicated that just looking for archive_mode == always though, you
need to look at if the backup has been started in recovery or not, and
then adapt using XLogArchivingActive() and XLogArchivingAlways(),
similarly to what is done when waiting for the archives.

> Which also makes it a smaller and clearer patch

Yes, this generates less diffs, reducing the likelihood of bugs. What
do you think about the v3 attached?
-- 
Michael

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] SQL/JSON in PostgreSQL
Next
From: David Rowley
Date:
Subject: Re: [HACKERS] Removing useless DISTINCT clauses