From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: checkpointer code behaving strangely on postmaster -T |
Date: | 2012-05-11 10:05:29 |
Message-ID: | CA+U5nMLtBrNSwY7espyJMkFLTD_7Bdesd84MCR0MDaExT+2dWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10 May 2012 16:14, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> Excerpts from Tom Lane's message of jue may 10 02:27:32 -0400 2012:
>>> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
>> I noticed while doing some tests that the checkpointer process does not
>> recover very nicely after a backend crashes under postmaster -T
>
>> It seems to me that the bug is in the postmaster state machine rather
>> than checkpointer itself. After a few false starts, this seems to fix
>> it:
>
>> --- a/src/backend/postmaster/postmaster.c
>> +++ b/src/backend/postmaster/postmaster.c
>> @@ -2136,6 +2136,8 @@ pmdie(SIGNAL_ARGS)
>> signal_child(WalWriterPID, SIGTERM);
>> if (BgWriterPID != 0)
>> signal_child(BgWriterPID, SIGTERM);
>> + if (FatalError && CheckpointerPID != 0)
>> + signal_child(CheckpointerPID, SIGUSR2);
>
> Surely we do not want the checkpointer doing a shutdown checkpoint here.
> If we need it to die immediately, SIGQUIT is the way. If we want a
> shutdown checkpoint, that has to wait till after everything else is
> known dead. So while I agree this may be a state machine bug, that
> doesn't look like a good fix.
Is this now fixed? You've made a few changes so I'm confused. Thanks.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Cédric Villemain | 2012-05-11 10:08:27 | Re: Draft release notes complete |
Previous Message | Magnus Hagander | 2012-05-11 09:48:28 | Re: "pgstat wait timeout" just got a lot more common on Windows |