Re: Hot standby, recovery infra - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Hot standby, recovery infra
Date
Msg-id 3f0b79eb0902261132i7c62c6dbw211fe6964139c69e@mail.gmail.com
Whole thread Raw
In response to Re: Hot standby, recovery infra  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Hi,

On Fri, Feb 27, 2009 at 3:38 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> I think the real problem here is that pg_standby traps SIGQUIT. The startup
> process doesn't receive the SIGQUIT because it's in system(), and pg_standby
> doesn't propagate it to the startup process either because it traps it.

Yes, you are right.

> I think we should simply remove the signal handler for SIGQUIT from
> pg_standby.

+1

> I don't see how that helps, as we already have this in there:
>
>        signaled = WIFSIGNALED(rc) || WEXITSTATUS(rc) > 125;
>
>        ereport(signaled ? FATAL : DEBUG2,
>                (errmsg("could not restore file \"%s\" from archive: return code %d",
>                                xlogfname, rc)));
>
> which means we already ereport(FATAL) if the restore command dies with SIGQUIT.

SIGQUIT should kill the process immediately, so I think that the startup
process as well as other auxiliary process should call exit(2) instead of
ereport(FATAL). Right?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Dave Gudeman
Date:
Subject: a proposal for an extendable deparser
Next
From: Simon Riggs
Date:
Subject: Re: Hot standby, recovery infra