Re: Updated backup APIs for non-exclusive backups

From: David Steele <david(at)pgmasters(dot)net>
To: Stephen Frost <sfrost(at)snowman(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Updated backup APIs for non-exclusive backups
Date: 2016-02-10 15:16:00
Message-ID: 56BB5430.8060907@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/10/16 9:44 AM, Stephen Frost wrote:
> * Magnus Hagander (magnus(at)hagander(dot)net) wrote:
>> On Wed, Feb 10, 2016 at 2:46 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>> On 2016-02-10 13:46:05 +0100, Magnus Hagander wrote:
>>>> * If the client disconnects with a non-exclusive backup running, the
>>> backup
>>>> is automatically aborted. This is the same thing that pg_basebackup does.
>>>> To use these non-exclusive backups the backup software will have to
>>>> maintain a persistent connection to the database -- something that should
>>>> not be a problem for any of the modern ones out there (but would've been
>>>> slightly trickier back in the days when we suggested shellscripts)
>>>
>>> I think we might want to make this one optional, but I'm not going to
>>> fight super hard for it.
>>
>> Not sure what you're referring to here. Do you mean being able to make a
>> non-exclusive backup while not maintaining a connection? That's going to
>> make things a *lot* more complicated, as we'd have to invent something like
>> "backup slots" similar to what we're doing with replication slots. I doubt
>> it's worth all that work and complexity.

Agreed.

> Hrmmm. If that's the case then perhaps you're right. I liked the
> general idea of not having to maintain a TCP connection during the
> entire backup (TCP connections can be annoyingly finicky in certain
> environments...), but I'm not sure it's worth a lot of additional
> complexity.

Well, pgBackRest holds a connection to PostgreSQL through the entire
backup and will abort the backup if it is severed. The connection is
always held locally, though, even if the master backup process is on a
different server. I haven't gotten any reports of aborted backups due
to the connection failing.

--
-David
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-02-10 15:18:20 Re: Updated backup APIs for non-exclusive backups
Previous Message Robert Haas 2016-02-10 15:12:53 pgsql: Code cleanup in the wake of recent LWLock refactoring.