Re: Immediate shutdown during recovery - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Immediate shutdown during recovery
Date
Msg-id 1227886813.20796.162.camel@hp_dx2400_1
Whole thread Raw
In response to Re: Immediate shutdown during recovery  ("Fujii Masao" <masao.fujii@gmail.com>)
Responses Re: Immediate shutdown during recovery
List pgsql-hackers
On Fri, 2008-11-28 at 19:53 +0900, Fujii Masao wrote:
> Hi,
> 
> On Fri, Nov 28, 2008 at 6:56 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> > Hi,
> >
> > The immediate shutdown (pg_ctl -m i stop) might not be able to
> > kill the startup process during archive recovery. It's because
> > the startup process calls system() which ignores SIGQUIT for
> > executing the restore_command. So, only the startup process
> > might survive the immediate shutdown and continue redoing up
> > to the end. Is this desirable behavior? This sounds odd for me.
> 
> In RestoreArchivedFile(), there is the following code as the safeguard
> against the termination of restore_command by signal. But the
> safeguard might not work if restore_command defines its own signal
> handler for SIGQUIT like pg_standby.
> 
> > signaled = WIFSIGNALED(rc) || WEXITSTATUS(rc) > 125;
> >
> > ereport(signaled ? FATAL : DEBUG2,
> >     (errmsg("could not restore file \"%s\" from archive: return code %d",
> >             xlogfname, rc)));

Agree there is an existing problem.

Suggest we fix it after the main patches are committed.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Add support for matching wildcard server certificates to the new
Next
From: "David E. Wheeler"
Date:
Subject: Re: Distinct types