Re: Remove Deprecated Exclusive Backup Mode - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Remove Deprecated Exclusive Backup Mode
Date
Msg-id CABUevEz556ufDKrFbgPgi8jjwgOypX-PG6qdz2HQv-xVnXJZ0Q@mail.gmail.com
Whole thread Raw
In response to Re: Remove Deprecated Exclusive Backup Mode  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Remove Deprecated Exclusive Backup Mode
List pgsql-hackers
On Wed, Jul 1, 2020 at 9:43 PM Robert Haas <robertmhaas@gmail.com> wrote:
On Wed, Jul 1, 2020 at 11:48 AM Magnus Hagander <magnus@hagander.net> wrote:
> We don't even need to make it an exclusive mode -- we can allow *nonexclusive* backups but remove the requirement to run start and stop backup in the same connection, which I believe is the problem that people have with the exclusive mode.

Well, one of the big advantages of the non-exclusive mode is that the
backup automatically is terminated if the connection is closed, which
removes the possibility of leaving a backup in progress for a long
time inadvertently. I think that back-tracking on that would probably
be a step in the wrong direction.

I am in no way suggesting we should do this to replace the nonexclusive backups the way they are now. They would still retain this property, and should be encouraged to be the default way.

I am only suggesting  this as an alternative to the exclusive ones, which hopefully can get rid of most of the drawbacks of the exclusive mode ones. Yes, it would still lack the ability to  automatically terminate  (except it *would* do such a termination if the server restarted -- instead of like the current exclusive mode which just breaks the server then).


I agree with what I understand to be Bruce's position -- non-exclusive
backup mode is better than exclusive mode backup mode, but exclusive
backup mode is not broken and doesn't need to be removed. I think it's
very sensible to continue to support exclusive backup mode but to
encourage users to use non-exclusive backup mode instead. I find
Stephen's position that exclusive backup mode cannot be used safely to
be unsupported by any compelling evidence, and reviewing the thread, I
find that there are a LOT of people who seem to agree.


I think that is what I'm suggesting -- that is, I'm suggesting a way to solve the actual problems that people have with non-exclusive mode, to the point of making it possible ot run those without the drawbacks.

As far as I've seen, the one thing that people have problems with in the exclusive mode backups are precisely the fact that they have to keep a persistent conneciton open, and thus it cannot work together with backup software that is limited to only supporting running a pre- and a post script. 

Something like I have suggested here is to solve *that* problem. I don't think anybody actually explicitly wants "exclusive backups" -- they want a backup solution that plugs into their world of pre/post scripts. And if we can make that one work in a safer way than the current exclusive backups, ohw is that not an improvement?

//Magnus

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode
Next
From: Stephen Frost
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode