Stefan's bug (was: max_standby_delay considered harmful) - Mailing list pgsql-hackers

From Robert Haas
Subject Stefan's bug (was: max_standby_delay considered harmful)
Date
Msg-id AANLkTimrBKB2OHXgrYMGL89mT-YplUmQrjwbILRC41Vb@mail.gmail.com
Whole thread Raw
Responses Re: Stefan's bug (was: max_standby_delay considered harmful)
List pgsql-hackers
On Wed, May 12, 2010 at 3:55 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> I am wondering if we are not correctly handling the case where we get
> a shutdown request while we are still in the PM_STARTUP state.  It
> looks like we might go ahead and switch to PM_RECOVERY and then
> PM_RECOVERY_CONSISTENT without noticing the shutdown.  There is some
> logic to handle the shutdown when the startup process exits, but if
> the startup process never exits it looks like we might get stuck.

I can reproduce the behavior Stefan is seeing consistently using the
attached patch.

W1: postgres -D ~/pgslave
W2: pg_ctl -D ~/pgslave stop

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: How to know killed by pg_terminate_backend
Next
From: "Joshua D. Drake"
Date:
Subject: Re: primary/secondary/master/slave/standby