From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(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-03-02 20:41:57 |
Message-ID: | 3b928ed1-766a-8873-f4fd-83fc404806e2@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 3/2/18 1:03 PM, Fujii Masao wrote:
> On Fri, Mar 2, 2018 at 1:07 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
>> We would talk about two backups running
>> simultaneously on a standby, which would overlap with each other to
>> generate a file aimed only at being helpful for debugging purposes, and
>> we provide no information now for backups taken from standbys. We could
>> of course make that logic a bit smarter by checking if there is an
>> extsing file with the same name and create a new file with a different
>> name. But is that worth the complication? That's where I am not
>> convinced, and that's the reason why this patch is doing things this
>> way.
>
> What about including the backup history file in the base backup instead of
> creating it in the standby's pg_wal and archiving it? As the good side effect
> of this approach, we can use the backup history file for debugging purpose
> even when WAL archiving is not enabled.
I don't think this is a good idea, even if it does solve the race
condition. First, it would be different from the way primary-style
backups generate this file. Second, these files would not be excluded
from future restore / backup cycles so they could build up after a while
and cause confusion. I guess we could teach PG to delete them or
pg_basebackup to ignore them, but that doesn't seem worth the effort.
Regards,
--
-David
david(at)pgmasters(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-03-02 20:51:46 | Re: Cached/global query plans, autopreparation |
Previous Message | Andres Freund | 2018-03-02 20:38:43 | Re: Cached/global query plans, autopreparation |