Re: backup_label and server start

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: Tom Lane *EXTERN* <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: backup_label and server start
Date: 2007-11-21 09:07:45
Message-ID: 1195636065.4217.431.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Childs 2007-11-21 09:47:22 Re: backup_label and server start
Previous Message Albe Laurenz 2007-11-21 08:04:21 Re: backup_label and server start