Re: backup_label and server start - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: backup_label and server start
Date
Msg-id 1195636065.4217.431.camel@ebony.site
Whole thread Raw
In response to Re: backup_label and server start  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Responses Re: backup_label and server start  ("Peter Childs" <peterachilds@gmail.com>)
Re: backup_label and server start  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Re: backup_label and server start  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-hackers
On Wed, 2007-11-21 at 09:04 +0100, Albe Laurenz wrote:

> If somebody stops the postmaster while an online backup is
> in progress, there is no warning or nothing. Only the server
> will fail to restart.

Well, it seems best not to do this. There is always a need for a careful
procedure to manually shutdown a live server, interlocking with other
applications. ISTM like a manual procedure will resolve this for you.

If we remove the file in the place you suggest then an Archive Recovery
will succeed when it should fail, with no possibility of a hint, which
seems a worse error.

> All I want to do is restart a server after a clean shutdown.
> 
> How about my second suggestion:
> 
> Remove backup_label when the server shuts down cleanly.
> In that case an online backup in progress will not be useful
> anyway, and there is no need to recover on server restart.

That will make PITRs fail:

1. pg_start_backup()
2. backup
3. shutdown, removes backup_label
4. pg_stop_backup() 

step 4 will now fail because of a missing backup_label file.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: "B. Maust"
Date:
Subject: plperl failure on OS X 10.5(.1)
Next
From: "Peter Childs"
Date:
Subject: Re: backup_label and server start