Stefan's bug (was: max_standby_delay considered harmful)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Florian Pflug <fgp(at)phlo(dot)org>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>, Greg Smith <greg(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>
Subject: Stefan's bug (was: max_standby_delay considered harmful)
Date: 2010-05-13 00:48:41
Message-ID: AANLkTimrBKB2OHXgrYMGL89mT-YplUmQrjwbILRC41Vb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 12, 2010 at 3:55 PM, Robert Haas <robertmhaas(at)gmail(dot)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 Content-Type Size
breakit.patch application/octet-stream 415 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-05-13 00:54:49 Re: primary/secondary/master/slave/standby
Previous Message Tatsuo Ishii 2010-05-13 00:24:52 How to know killed by pg_terminate_backend