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

Re: Improve shutdown during online backup, take 4

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Magnus Hagander" <magnus(at)hagander(dot)net>,"Alvaro Herrera" <alvherre(at)commandprompt(dot)com>,<pgsql-patches(at)postgresql(dot)org>
Subject: Re: Improve shutdown during online backup, take 4
Date: 2008-04-25 07:00:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane wrote:
>>> Why not?  It'll fall out of the state again immediately in
>>> PostmasterStateMachine, no, if we do a CancelBackup here?
>> We cannot call CancelBackup there because that's exactly the state
>> in which a smart shutdown waits for a superuser to issue pg_stop_backup().
> Er, I was complaining about the fast-shutdown code path, not the
> smart-shutdown one.

Yes, I got that.
So you suggest that a fast shutdown *first* calls CancelBackup and
then goes into WAIT_BACKUP state, right?

That should work, but isn't it better if backup_label is removed
only if we know we're going to shutdown cleanly?

I think the patch in
should meet your justified complaints, by calling CancelBackup immediately
before PostmasterExit(0) in PostmasterStateMachine.

Laurenz Albe

In response to


pgsql-patches by date

Next:From: Hans-Juergen SchoenigDate: 2008-04-25 07:10:58
Subject: Re: 64-bit CommandIds
Previous:From: Gregory StarkDate: 2008-04-25 05:04:38
Subject: Re: Proposed patch - psql wraps at window width

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