From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | David Steele <david(at)pgmasters(dot)net> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: [HACKERS] Creating backup history files for backups taken from standbys |
Date: | 2018-01-05 14:27:18 |
Message-ID: | CANP8+jJNSBhL+o9uMuw2x0_=DqiRv5Ppta-pU6ckZ1pwU_uhSw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 19 September 2017 at 00:33, David Steele <david(at)pgmasters(dot)net> wrote:
> On 9/18/17 7:26 PM, Michael Paquier wrote:
>> On Tue, Sep 19, 2017 at 8:14 AM, David Steele <david(at)pgmasters(dot)net> wrote:
>>> On 8/31/17 11:56 PM, Michael Paquier wrote:
>>>> Here is an updated patch with refreshed documentation, as a result of
>>>> 449338c which was discussed in thread
>>>> https://www.postgresql.org/message-id/d4d951b9-89c0-6bc1-b6ff-d0b2dd5a8966@pgmasters.net.
>>>> I am just outlining the fact that a backup history file gets created
>>>> on standbys and that it is archived.
>>>
>>> The patch looks good overall. It applies cleanly and passes all tests.
>>>
>>> One question. Do we want to create this file all the time (as written),
>>> or only when archive_mode = always?
>>>
>>> It appears that CleanupBackupHistory() will immediately remove the
>>> history file when archive_mode != always so it seems useless to write
>>> it. On the other hand the code is a bit simpler this way. Thoughts?
>>
>> With archive_mode = off, the bytes of the backup history file are
>> still written to disk, so my take on the matter is to keep the code
>> simple.
>
> I'm OK with that.
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
Which also makes it a smaller and clearer patch
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-01-05 14:28:53 | Re: pgsql: Implement channel binding tls-server-end-point for SCRAM |
Previous Message | Simon Riggs | 2018-01-05 14:19:46 | Re: Fix permissions check on pg_stat_get_wal_senders |