Skip site navigation (1) Skip section navigation (2)

Re: Proposal: improve shutdown during online backup

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: improve shutdown during online backup
Date: 2008-03-26 20:51:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 2008-03-26 at 14:36 +0100, Albe Laurenz wrote:
> I'm referring to the discussion in this thread:
> As expressed in the thread, I think that there should not be
> a backup_label file in the data directory after a clean shutdown,
> because
> a) it's probably an oversight anyway (someone forgot to
>    call pg_stop_backup) and
> b) it will force an unnecessary recovery at server restart,
>    which will sometimes fail (if the WAL file is no longer there).
> This is my proposal:
> 1) On "pg_ctl stop|restart -m smart", check if online backup is
>    in progress and do not shutdown in this case (treat the online
>    backup like an open connection).
> 2) On "pg_ctl stop|restart -m fast", remove backup_label after
>    the server has been brought down successfully.
> If that's acceptable, I'd be willing to work on it.

Seems reasonable. Go for it.

  Simon Riggs

  PostgreSQL UK 2008 Conference:

In response to

pgsql-hackers by date

Next:From: Neil ConwayDate: 2008-03-26 21:26:41
Subject: Re: Surfacing qualifiers
Previous:From: Chris BrowneDate: 2008-03-26 20:25:58
Subject: Re: Sending queries directly

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group