Re: Remove Deprecated Exclusive Backup Mode

2020-07-10 Thread David Steele
On 7/2/20 7:12 AM, David Steele wrote: None of this really solves the problem of what happens when the user dumps the backup_label into the data directory. With traditional backup software that's pretty much going to be the only choice. Is telling them not to do it and washing our hands of it

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > On Thu, Jul 2, 2020 at 1:06 AM Jehan-Guillaume de Rorthais > wrote: > > function to list in progress non-exclusive backup and related backend pid > > might > > be a good start? > > I think it would make perfect sense to show manual (exc

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Wed, 2020-07-01 at 16:46 -0400, Stephen Frost wrote: > > If someone could explain what is so special about *this* part of the > > system that we absolutely can't possibly accept any change that might > > break user's scripts, and why

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread Jehan-Guillaume de Rorthais
On Thu, 2 Jul 2020 12:32:14 +0200 Magnus Hagander wrote: [...] > > non-exclusive backup...this is not that easy anymore. And > > pg_is_in_backup() is quite misleading if the admin found it without reading > > doc. Maybe an admin > > Yeah, as it is now it should really be called pg_is_in_exclusiv

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread David Steele
On 7/1/20 5:44 PM, Magnus Hagander wrote: On Wed, Jul 1, 2020 at 11:08 PM David Steele > wrote: But yeah, it would be possible to kill somebody else's session with some finagling. Still, worse case would be an error'd backup rather than a corrupt one.

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread Magnus Hagander
On Thu, Jul 2, 2020 at 10:35 AM Laurenz Albe wrote: > On Wed, 2020-07-01 at 16:46 -0400, Stephen Frost wrote: > > I continue to find it curious that we stress a great deal over (very > > likely) poorly written backup scripts that haven't been updated in the > > 5+? years since exclusive mode was

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread Magnus Hagander
On Thu, Jul 2, 2020 at 1:06 AM Jehan-Guillaume de Rorthais wrote: > On Wed, 1 Jul 2020 15:58:57 -0400 > Robert Haas wrote: > > > On Wed, Jul 1, 2020 at 3:50 PM Magnus Hagander > wrote: > > > As far as I've seen, the one thing that people have problems with in > the > > > exclusive mode backups

Re: Remove Deprecated Exclusive Backup Mode

2020-07-02 Thread Laurenz Albe
On Wed, 2020-07-01 at 16:46 -0400, Stephen Frost wrote: > I continue to find it curious that we stress a great deal over (very > likely) poorly written backup scripts that haven't been updated in the > 5+? years since exclusive mode was deprecated, but we happily add new > keywords in new major ver

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Jehan-Guillaume de Rorthais
On Wed, 1 Jul 2020 15:58:57 -0400 Robert Haas wrote: > On Wed, Jul 1, 2020 at 3:50 PM Magnus Hagander wrote: > > 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

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Magnus Hagander
On Wed, Jul 1, 2020 at 11:08 PM David Steele wrote: > On 7/1/20 4:39 PM, Magnus Hagander wrote: > > On Wed, Jul 1, 2020 at 10:28 PM David Steele > Here's a thought. What if we just stored the oldest starting LSN and > a > > count of how many backups have been requested. When the backup e

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Bruce Momjian
On Wed, Jul 1, 2020 at 05:20:16PM -0400, David Steele wrote: > On 7/1/20 4:32 PM, Bruce Momjian wrote: > > On Wed, Jul 1, 2020 at 04:27:58PM -0400, David Steele wrote: > > > On 7/1/20 3:58 PM, Robert Haas wrote: > > > > If we could jigger things so that you don't need to stop the backup at > > >

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread David Steele
On 7/1/20 4:32 PM, Bruce Momjian wrote: On Wed, Jul 1, 2020 at 04:27:58PM -0400, David Steele wrote: On 7/1/20 3:58 PM, Robert Haas wrote: If we could jigger things so that you don't need to stop the backup at all, you only start it, and whether you ever finish copying everything is something

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread David Steele
On 7/1/20 4:39 PM, Magnus Hagander wrote: On Wed, Jul 1, 2020 at 10:28 PM David Steele Here's a thought. What if we just stored the oldest starting LSN and a count of how many backups have been requested. When the backup ends it checks that backup count is > 0 and starting LSN is <= i

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jul 1, 2020 at 4:29 PM Bruce Momjian wrote: > > Agreed. I don't think three modes would help anyone. > > Well, I think that if and when we remove the existing exclusive mode, > we're going to break a bunch of people's backup scri

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Bruce Momjian
On Wed, Jul 1, 2020 at 04:36:03PM -0400, Robert Haas wrote: > On Wed, Jul 1, 2020 at 4:29 PM Bruce Momjian wrote: > > Agreed. I don't think three modes would help anyone. > > Well, I think that if and when we remove the existing exclusive mode, > we're going to break a bunch of people's backup

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Magnus Hagander
On Wed, Jul 1, 2020 at 10:28 PM David Steele wrote: > On 7/1/20 3:58 PM, Robert Haas wrote: > > On Wed, Jul 1, 2020 at 3:50 PM Magnus Hagander > wrote: > >> 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

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Robert Haas
On Wed, Jul 1, 2020 at 4:29 PM Bruce Momjian wrote: > Agreed. I don't think three modes would help anyone. Well, I think that if and when we remove the existing exclusive mode, we're going to break a bunch of people's backup scripts. I think it's appropriate to do that eventually, but I'm not in

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread David Steele
On 7/1/20 4:27 PM, David Steele wrote: Here's a thought. What if we just stored the oldest starting LSN and a count of how many backups have been requested. When the backup ends it checks that backup count is > 0 and starting LSN is <= its starting LSN. If not, it throws an error. When backup

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Robert Haas
On Wed, Jul 1, 2020 at 4:27 PM David Steele wrote: > Well, the only thing pg_stop_backup() *really* needs to know is the > starting WAL position. pg_start_backup() gets that info so if it passes > it back to pg_stop_backup() that could be enough. Or as was proposed > above, it just passes the back

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Bruce Momjian
On Wed, Jul 1, 2020 at 04:27:58PM -0400, David Steele wrote: > On 7/1/20 3:58 PM, Robert Haas wrote: > > If we could jigger things so that you don't need to stop the backup at > > all, you only start it, and whether you ever finish copying everything > > is something about which the system need no

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Bruce Momjian
On Wed, Jul 1, 2020 at 10:24:15PM +0200, Magnus Hagander wrote: > On Wed, Jul 1, 2020 at 9:59 PM Robert Haas wrote: > Yeah, I guess that's a pretty fair point. I have to confess to having > somewhat limited enthusiasm for adding a third mode here, but it might > be worth it. > The int

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread David Steele
On 7/1/20 3:58 PM, Robert Haas wrote: On Wed, Jul 1, 2020 at 3:50 PM Magnus Hagander wrote: 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 toget

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Magnus Hagander
On Wed, Jul 1, 2020 at 9:59 PM Robert Haas wrote: > On Wed, Jul 1, 2020 at 3:50 PM Magnus Hagander > wrote: > > 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

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Robert Haas
On Wed, Jul 1, 2020 at 3:50 PM Magnus Hagander wrote: > 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

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Magnus Hagander
On Wed, Jul 1, 2020 at 9:43 PM Robert Haas wrote: > On Wed, Jul 1, 2020 at 11:48 AM Magnus Hagander > 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 beli

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Wed, Jul 1, 2020 at 11:48 AM Magnus Hagander 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, whi

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Bruce Momjian
On Wed, Jul 1, 2020 at 01:23:21PM -0400, Stephen Frost wrote: > > Or, how about we require them to provide the backup label contents in its > > entirety? Which I believe does contain that WAL portion? The downside of > > that is that it would be multiline which might screw with shellscripts. > >

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Robert Haas
On Wed, Jul 1, 2020 at 11:48 AM Magnus Hagander 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 exclusiv

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > On Wed, Jul 1, 2020 at 6:29 PM Stephen Frost wrote: > > * Magnus Hagander (mag...@hagander.net) wrote: > > > On Wed, Jul 1, 2020 at 2:47 PM Stephen Frost wrote: > > > > This would presumably be for the exclusive API as a way to make it

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Magnus Hagander
On Wed, Jul 1, 2020 at 6:29 PM Stephen Frost wrote: > Greetings, > > * Magnus Hagander (mag...@hagander.net) wrote: > > On Wed, Jul 1, 2020 at 2:47 PM Stephen Frost wrote: > > > This would presumably be for the exclusive API as a way to make it not > > > completely broken, maybe. > > > > > > If

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > On Wed, Jul 1, 2020 at 2:47 PM Stephen Frost wrote: > > This would presumably be for the exclusive API as a way to make it not > > completely broken, maybe. > > > > If we wanted to try and make this work in a non-exclusive manner then >

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Magnus Hagander
On Wed, Jul 1, 2020 at 2:47 PM Stephen Frost wrote: > > This would presumably be for the exclusive API as a way to make it not > completely broken, maybe. > > If we wanted to try and make this work in a non-exclusive manner then > we'd need to do something like have the user save some info out at

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Jul 1, 2020 at 04:46:59PM +0200, Laurenz Albe wrote: > > On Wed, 2020-07-01 at 08:47 -0400, Stephen Frost wrote: > > > > I remain -1 on removing the exclusive backup API. > > > > > > It's still deprecated and I'm certainly against re

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Bruce Momjian
On Wed, Jul 1, 2020 at 04:46:59PM +0200, Laurenz Albe wrote: > On Wed, 2020-07-01 at 08:47 -0400, Stephen Frost wrote: > > > I remain -1 on removing the exclusive backup API. > > > > It's still deprecated and I'm certainly against removing that status > > until/unless someone actually fixes it (i

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Wed, 2020-07-01 at 08:47 -0400, Stephen Frost wrote: > > > I remain -1 on removing the exclusive backup API. > > > > It's still deprecated and I'm certainly against removing that status > > until/unless someone actually fixes it (in

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Laurenz Albe
On Wed, 2020-07-01 at 08:47 -0400, Stephen Frost wrote: > > I remain -1 on removing the exclusive backup API. > > It's still deprecated and I'm certainly against removing that status > until/unless someone actually fixes it (including documentation), and if > we're not going to do that then we sho

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Tue, 2020-06-30 at 17:38 -0400, David Steele wrote: > > Rebased patch is attached. > > I remain -1 on removing the exclusive backup API. It's still deprecated and I'm certainly against removing that status until/unless someone actu

Re: Remove Deprecated Exclusive Backup Mode

2020-07-01 Thread Laurenz Albe
On Tue, 2020-06-30 at 17:38 -0400, David Steele wrote: > Rebased patch is attached. I remain -1 on removing the exclusive backup API. People who don't mind manual intervention when PostgreSQL doesn't start after a crash in backup mode could safely use it. We have been over this, and there is not

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread Bruce Momjian
On Tue, Jun 30, 2020 at 07:32:47PM -0400, Stephen Frost wrote: > Greetings, > > * Bruce Momjian (br...@momjian.us) wrote: > > On Tue, Jun 30, 2020 at 07:10:46PM -0400, Stephen Frost wrote: > > > De-deprecating the exclusive backup mode and returning that info at the > > > start and telling users "

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Tue, Jun 30, 2020 at 07:10:46PM -0400, Stephen Frost wrote: > > De-deprecating the exclusive backup mode and returning that info at the > > start and telling users "put this anywhere EXCEPT this specific place, > > and make sure you DO put

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread Bruce Momjian
On Tue, Jun 30, 2020 at 07:10:46PM -0400, Stephen Frost wrote: > De-deprecating the exclusive backup mode and returning that info at the > start and telling users "put this anywhere EXCEPT this specific place, > and make sure you DO put these files in that exact place when you > restore" would perh

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > On 6/30/20 6:13 PM, Stephen Frost wrote: > >* David Steele (da...@pgmasters.net) wrote: > >>Lastly, there is some concern about getting the backup label too late when > >>doing snapshots or using traditional backup software. It would certain

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread David Steele
On 6/30/20 6:13 PM, Stephen Frost wrote: Greetings, * David Steele (da...@pgmasters.net) wrote: Lastly, there is some concern about getting the backup label too late when doing snapshots or using traditional backup software. It would certainly be possible to return the backup_label and tablespa

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > Lastly, there is some concern about getting the backup label too late when > doing snapshots or using traditional backup software. It would certainly be > possible to return the backup_label and tablespace_map from > pg_start_backup() and le

Re: Remove Deprecated Exclusive Backup Mode

2020-06-30 Thread David Steele
Steele Date: Tue, 30 Jun 2020 17:23:51 -0400 Subject: [PATCH] Remove Deprecated Exclusive Backup Mode. Remove the exclusive backup mode which has been deprecated since PostgreSQL 9.6. --- doc/src/sgml/backup.sgml | 150 +- doc/src/sgml/func.sgml

Re: Remove Deprecated Exclusive Backup Mode

2019-03-07 Thread David Steele
On 3/5/19 12:36 AM, Bruce Momjian wrote: On Thu, Feb 28, 2019 at 05:08:24PM +0200, David Steele wrote: On 2/28/19 4:44 PM, Fujii Masao wrote: On Wed, Feb 27, 2019 at 4:35 PM Laurenz Albe wrote: Fujii Masao wrote: So, let me clarify the situations; (3) If backup_label.pending exists but rec

Re: Remove Deprecated Exclusive Backup Mode

2019-03-04 Thread Bruce Momjian
On Thu, Feb 28, 2019 at 05:08:24PM +0200, David Steele wrote: > On 2/28/19 4:44 PM, Fujii Masao wrote: > > On Wed, Feb 27, 2019 at 4:35 PM Laurenz Albe > > wrote: > > > > > > Fujii Masao wrote: > > > > So, let me clarify the situations; > > > > > > > > (3) If backup_label.pending exists but rec

Re: Remove Deprecated Exclusive Backup Mode

2019-03-01 Thread David Steele
On 3/1/19 11:36 AM, Martín Marqués wrote: El jue., 28 de feb. de 2019 a la(s) 23:50, Michael Paquier (mich...@paquier.xyz) escribió: On Thu, Feb 28, 2019 at 11:07:47PM -0300, Martín Marqués wrote: El 28/2/19 a las 15:13, David Steele escribió: + + The exclusive backup method is deprecat

Re: Remove Deprecated Exclusive Backup Mode

2019-03-01 Thread Martín Marqués
El jue., 28 de feb. de 2019 a la(s) 23:50, Michael Paquier (mich...@paquier.xyz) escribió: > > On Thu, Feb 28, 2019 at 11:07:47PM -0300, Martín Marqués wrote: > > El 28/2/19 a las 15:13, David Steele escribió: > > + > > + The exclusive backup method is deprecated and should be avoided in > >

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread David G. Johnston
On Thu, Feb 28, 2019 at 7:51 PM Michael Paquier wrote: > On Thu, Feb 28, 2019 at 11:07:47PM -0300, Martín Marqués wrote: > > El 28/2/19 a las 15:13, David Steele escribió: > > + > > + The exclusive backup method is deprecated and should be avoided in > > favor > > + of the non-exclusive

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread Michael Paquier
On Thu, Feb 28, 2019 at 11:07:47PM -0300, Martín Marqués wrote: > El 28/2/19 a las 15:13, David Steele escribió: > + > + The exclusive backup method is deprecated and should be avoided in > favor > + of the non-exclusive backup method or > + pg_basebackup. > + > > Isn't pg_baseba

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread Martín Marqués
El 28/2/19 a las 15:13, David Steele escribió: > > It seems to me that the best way to discuss this is via a patch to the > main documentation.  I've written something to get us started: > > https://commitfest.postgresql.org/22/2042/ + + The exclusive backup method is deprecated and shoul

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread David Steele
On 2/27/19 8:22 PM, Christophe Pettus wrote: On Feb 26, 2019, at 11:38, Magnus Hagander wrote: That should not be a wiki page, really, that should be part of the main documentation. I was just suggesting using a wiki page to draft it before we drop it into the main documentation. I'm ope

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread David Steele
On 2/28/19 4:44 PM, Fujii Masao wrote: On Wed, Feb 27, 2019 at 4:35 PM Laurenz Albe wrote: Fujii Masao wrote: So, let me clarify the situations; (3) If backup_label.pending exists but recovery.signal doesn't, the server ignores (or removes) backup_label.pending and do the recovery

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread Stephen Frost
Greetings, * Fujii Masao (masao.fu...@gmail.com) wrote: > On Wed, Feb 27, 2019 at 4:35 PM Laurenz Albe wrote: > > > > Fujii Masao wrote: > > > So, let me clarify the situations; > > > > > > (3) If backup_label.pending exists but recovery.signal doesn't, the server > > >ignores (or removes

Re: Remove Deprecated Exclusive Backup Mode

2019-02-28 Thread Fujii Masao
On Wed, Feb 27, 2019 at 4:35 PM Laurenz Albe wrote: > > Fujii Masao wrote: > > So, let me clarify the situations; > > > > (3) If backup_label.pending exists but recovery.signal doesn't, the server > >ignores (or removes) backup_label.pending and do the recovery > >starting the pg_c

Re: Remove Deprecated Exclusive Backup Mode

2019-02-27 Thread Christophe Pettus
> On Feb 26, 2019, at 11:38, Magnus Hagander wrote: > That should not be a wiki page, really, that should be part of the main > documentation. I was just suggesting using a wiki page to draft it before we drop it into the main documentation. I'm open to other suggestions, of course! -- --

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Laurenz Albe
Fujii Masao wrote: > So, let me clarify the situations; > > (3) If backup_label.pending exists but recovery.signal doesn't, the server >ignores (or removes) backup_label.pending and do the recovery >starting the pg_control's REDO location. This case can happen if >the serve

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Chapman Flack
On 2/26/19 2:46 PM, Andres Freund wrote: > Also, there's so much wrong stuff on the wiki that people that know to > look there just don't believe what they read. Should there be a wiki errata page on the wiki? I'm fairly serious ... for those times when you're reading the Foo page on the wiki, a

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Peter Geoghegan
On Mon, Feb 25, 2019 at 10:49 PM David Steele wrote: > Worse, they have scripted the deletion of backup_label so that the > cluster will restart on crash. This is the recommendation from our > documentation after all. If that script runs after a restore instead of > a crash, then the cluster wil

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Andres Freund
Hi, On 2019-02-26 20:38:17 +0100, Magnus Hagander wrote: > That should not be a wiki page, really, that should be part of the main > documentation. +1 > It can be drafted on the wiki of course, but we *really* should get > something like that into the docs. Because that's what people are going t

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Magnus Hagander
On Tue, Feb 26, 2019 at 6:31 PM Christophe Pettus wrote: > > > > On Feb 26, 2019, at 09:26, Robert Haas wrote: > > > > On Tue, Feb 26, 2019 at 12:20 PM Fujii Masao > wrote: > >> So, let me clarify the situations; > >> > >> (1) If backup_label and recovery.signal exist, the recovery starts > saf

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Fujii Masao
On Tue, Feb 26, 2019 at 3:49 PM David Steele wrote: > > On 2/26/19 6:51 AM, Michael Paquier wrote: > > On Mon, Feb 25, 2019 at 08:17:27PM +0200, David Steele wrote: > >> Here's the really obvious bad thing: if users do not update their > >> procedures > >> and we ignore backup_label.pending on st

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Robert Haas
On Tue, Feb 26, 2019 at 12:31 PM Christophe Pettus wrote: > I believe #1 is when backup_label (no .pending) exists, #2 is when > backup_label.pending (with .pending) exists. Oh, whoops. I get it now. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Fujii Masao
On Wed, Feb 27, 2019 at 2:27 AM Robert Haas wrote: > > On Tue, Feb 26, 2019 at 12:20 PM Fujii Masao wrote: > > So, let me clarify the situations; > > > > (1) If backup_label and recovery.signal exist, the recovery starts safely. > >This is the normal case of recovery from the base backup.

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Christophe Pettus
> On Feb 26, 2019, at 09:26, Robert Haas wrote: > > On Tue, Feb 26, 2019 at 12:20 PM Fujii Masao wrote: >> So, let me clarify the situations; >> >> (1) If backup_label and recovery.signal exist, the recovery starts safely. >> This is the normal case of recovery from the base backup. >>

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Robert Haas
On Tue, Feb 26, 2019 at 12:20 PM Fujii Masao wrote: > So, let me clarify the situations; > > (1) If backup_label and recovery.signal exist, the recovery starts safely. >This is the normal case of recovery from the base backup. > > (2)If backup_label.pending and recovery.signal exist, as de

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Fujii Masao
On Tue, Feb 26, 2019 at 3:17 AM David Steele wrote: > > On 2/25/19 7:50 PM, Fujii Masao wrote: > > On Mon, Feb 25, 2019 at 10:49 PM Laurenz Albe > > wrote: > >> > >> I'm not playing devil's advocate here to annoy you. I see the problems > >> with the exclusive backup, and I see how it can hurt

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Robert Haas
On Tue, Feb 26, 2019 at 1:49 AM David Steele wrote: > The operator still has a decision to make, manually, just as they do > now. The wrong decision may mean a corrupt database. > > Here's the scenario: > > 1) They do a restore, forget to rename backup_label.pending. > 2) Postgres won't start, wh

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > I think the fundamental problem with all these approaches is that there is > no safe way to distinguish a server crashed in backup mode from a restored > backup. This is what makes the problem so hard. Right- if you want to just call

Re: Remove Deprecated Exclusive Backup Mode

2019-02-26 Thread Stephen Frost
Greetings, * Mark Kirkwood (mark.kirkw...@catalyst.net.nz) wrote: > On 26/02/19 5:41 PM, Stephen Frost wrote: > >* Mark Kirkwood (mark.kirkw...@catalyst.net.nz) wrote: > >>ISTM that the onus should be on the patch submitter to provide additions to > >>pg_basebackup that make it as painless as poss

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Laurenz Albe
Fujii Masao wrote: > Another idea is to improve an exclusive backup method so that it will never > cause such issue. What about changing an exclusive backup mode of > pg_start_backup() so that it creates something like backup_label.pending file > instead of backup_label? Then if the database cluste

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
On 2/26/19 6:51 AM, Michael Paquier wrote: On Mon, Feb 25, 2019 at 08:17:27PM +0200, David Steele wrote: Here's the really obvious bad thing: if users do not update their procedures and we ignore backup_label.pending on startup then they will end up with a corrupt database because it will not re

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Mark Kirkwood
On 26/02/19 5:41 PM, Stephen Frost wrote: Greetings Mark, * Mark Kirkwood (mark.kirkw...@catalyst.net.nz) wrote: ISTM that the onus should be on the patch submitter to provide additions to pg_basebackup that make it as painless as possible for those people *not* using pgBackRest to continue m

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Michael Paquier
On Mon, Feb 25, 2019 at 08:17:27PM +0200, David Steele wrote: > Here's the really obvious bad thing: if users do not update their procedures > and we ignore backup_label.pending on startup then they will end up with a > corrupt database because it will not replay from the correct checkpoint. If >

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Stephen Frost
Greetings Mark, * Mark Kirkwood (mark.kirkw...@catalyst.net.nz) wrote: > ISTM that the onus should be on the patch submitter to provide additions to > pg_basebackup that make it as painless as possible for those people *not* > using pgBackRest to continue making backups. Breaking this is just not

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Mark Kirkwood
On 26/02/19 4:53 PM, Robert Haas wrote: On Mon, Feb 25, 2019 at 4:38 PM David Steele wrote: FWIW, if you weren't selling backrest quite so hard everywhere backups are mentioned, I'd find this thread a lot more convicing. pgBackRest has not used exclusive backups since the new API was introdu

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Stephen Frost
Robert, * Robert Haas (robertmh...@gmail.com) wrote: > Hmm, so what you're saying is that you'd like to disable an API that > some non-backrest users are relying upon but which no backrest users > are relying upon. And you don't understand why some non-backrest > users are opposed to that plan.

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Robert Haas
On Mon, Feb 25, 2019 at 4:38 PM David Steele wrote: > > FWIW, if you weren't selling backrest quite so hard everywhere backups > > are mentioned, I'd find this thread a lot more convicing. > > pgBackRest has not used exclusive backups since the new API was > introduced in 9.6 so this is not an iss

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2019-02-25 08:42:02 -0500, Stephen Frost wrote: > > * Andres Freund (and...@anarazel.de) wrote: > > > On 2019-02-24 17:19:22 -0500, Stephen Frost wrote: > > > > You say above that the new interface is unquestionably an improvement > > >

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
On 2/25/19 11:59 PM, Christophe Pettus wrote: On Feb 25, 2019, at 13:38, Andres Freund wrote: I think you might be right about this specific issue. But to me it sounds like you also don't appreciate that development resources are really constrained too, and providing endless backward compati

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2019-02-25 08:14:16 -0500, Stephen Frost wrote: > > > It will be annoying if after this removal, companies must change their > > > backup strategy by using specific postgres tools (pgbackrest, barman). > > > > You don't write your own da

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Christophe Pettus
> On Feb 25, 2019, at 13:38, Andres Freund wrote: > > I think you might be right about this specific issue. But to me it > sounds like you also don't appreciate that development resources are > really constrained too, and providing endless backward compatibility for > everything is going to us

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
On 2/25/19 11:38 PM, Andres Freund wrote: Hi, On 2019-02-25 09:24:32 -0800, Christophe Pettus wrote: But the resistance to major version upgrades is *huge*, and I'm strongly biased against anything that will make that harder. I'm not sure I'm communicating how big a problem telling many large

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
Hi Andres, On 2/25/19 10:57 PM, Andres Freund wrote: Hi, On 2019-02-25 08:14:16 -0500, Stephen Frost wrote: It will be annoying if after this removal, companies must change their backup strategy by using specific postgres tools (pgbackrest, barman). You don't write your own database system u

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Magnus Hagander
On Mon, Feb 25, 2019 at 10:14 PM Andres Freund wrote: > On 2019-02-25 08:42:02 -0500, Stephen Frost wrote: > > Greetings, > > > > * Andres Freund (and...@anarazel.de) wrote: > > > On 2019-02-24 17:19:22 -0500, Stephen Frost wrote: > > > > You say above that the new interface is unquestionably an

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Andres Freund
Hi, On 2019-02-25 09:24:32 -0800, Christophe Pettus wrote: > But the resistance to major version upgrades is *huge*, and I'm > strongly biased against anything that will make that harder. I'm not > sure I'm communicating how big a problem telling many large > installations, "If you move to v12/13

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
On 2/25/19 11:20 PM, Christophe Pettus wrote: On Feb 25, 2019, at 11:24, Stephen Frost wrote: Aren't they going to need to make a change for v12 now anyway? Hopefully they're regularly testing their backups by doing a restore of them, and dropping a recovery.conf into the directory of a v12

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Christophe Pettus
> On Feb 25, 2019, at 11:24, Stephen Frost wrote: > Aren't they going to need to make a change for v12 now anyway? > > Hopefully they're regularly testing their backups by doing a restore of > them, and dropping a recovery.conf into the directory of a v12 system > after restore will do exactly

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Andres Freund
Hi, On 2019-02-25 20:43:01 +0200, David Steele wrote: > fsync() is the major corruption issue we are facing right now but that > doesn't mean there aren't other sources of corruption we should be thinking > about. I've thought about this one a lot and it scares me. FWIW, I think this kind of iss

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Andres Freund
On 2019-02-25 08:42:02 -0500, Stephen Frost wrote: > Greetings, > > * Andres Freund (and...@anarazel.de) wrote: > > On 2019-02-24 17:19:22 -0500, Stephen Frost wrote: > > > You say above that the new interface is unquestionably an improvement > > > > FWIW, I think we didn't design it even remotel

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Andres Freund
Hi, On 2019-02-25 08:14:16 -0500, Stephen Frost wrote: > > It will be annoying if after this removal, companies must change their > > backup strategy by using specific postgres tools (pgbackrest, barman). > > You don't write your own database system using CSV files and shell > magic, do you? I h

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Bruce Momjian
On Mon, Feb 25, 2019 at 02:24:18PM -0500, Stephen Frost wrote: > * Bruce Momjian (br...@momjian.us) wrote: > > On Mon, Feb 25, 2019 at 11:33:33AM -0500, Stephen Frost wrote: > > > I don't want to see more users stumbling over the issues with the > > > exclusive backup interface. A better interface

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Stephen Frost
Greetings, * David Steele (da...@pgmasters.net) wrote: > On 2/25/19 7:50 PM, Fujii Masao wrote: > >Thought? > > Here's the really obvious bad thing: if users do not update their procedures > and we ignore backup_label.pending on startup then they will end up with a > corrupt database because it w

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Stephen Frost
Greetings, * Christophe Pettus (x...@thebuild.com) wrote: > > On Feb 25, 2019, at 08:55, Stephen Frost wrote: > > > > I honestly do doubt that they have had the same experiences that I have > > had > > Well, I guarantee you that no two people on this list have had identical > experiences. :)

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
Hi Christophe, On 2/25/19 7:24 PM, Christophe Pettus wrote: On Feb 25, 2019, at 08:55, Stephen Frost wrote: I honestly do doubt that they have had the same experiences that I have had Well, I guarantee you that no two people on this list have had identical experiences. :) I certainly ha

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Bruce Momjian
On Mon, Feb 25, 2019 at 11:33:33AM -0500, Stephen Frost wrote: > I don't want to see more users stumbling over the issues with the > exclusive backup interface. A better interface exists, and has existed > since 9.6. Do you really think we would be having this discussion if the non-exclusive back

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread David Steele
On 2/25/19 7:50 PM, Fujii Masao wrote: On Mon, Feb 25, 2019 at 10:49 PM Laurenz Albe wrote: I'm not playing devil's advocate here to annoy you. I see the problems with the exclusive backup, and I see how it can hurt people. I just think that removing exclusive backup without some kind of help

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Fujii Masao
On Mon, Feb 25, 2019 at 10:49 PM Laurenz Albe wrote: > > Stephen Frost wrote: > > > It will be annoying if after this removal, companies must change their > > > backup strategy by using specific postgres tools (pgbackrest, barman). > > > > You don't write your own database system using CSV files a

Re: Remove Deprecated Exclusive Backup Mode

2019-02-25 Thread Christophe Pettus
> On Feb 25, 2019, at 08:55, Stephen Frost wrote: > > I honestly do doubt that they have had the same experiences that I have > had Well, I guarantee you that no two people on this list have had identical experiences. :) I certainly have been bitten by the problems with the current system.

  1   2   3   >