Re: Improve shutdown during online backup, take 4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
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-26 22:51:49
Message-ID: 10716.1209250309@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
> Tom Lane wrote:
>> If you actually want the behavior you propose, then the only correct way
>> to implement it is to embed it into the state machine logic, ie, do the
>> CancelBackup inside PostmasterStateMachine in some state transition
>> taken after the last child is gone.

> I've attached a patch that works for me. I hope I got it right.

Applied with additional cleanup. You hadn't thought very carefully
about additional state transitions that would have to be introduced
into the postmaster state machine to support a new state --- for
example, as coded a SIGINT delivered to the postmaster after SIGTERM
would fail to do anything at all, when of course it really ought to
force us into fast shutdown. Also, it's not really that hard to
disallow non-superusers from connecting in PM_WAIT_BACKUP state.

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Hiroshi Saito 2008-04-27 14:57:40 win32mak_patch
Previous Message Hans-Juergen Schoenig 2008-04-25 18:03:25 Re: 64-bit CommandIds