From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Latches, loop and exit |
Date: | 2010-09-15 06:40:40 |
Message-ID: | 4C906A68.9040709@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 15/09/10 09:19, Simon Riggs wrote:
> On Wed, 2010-09-15 at 10:33 +0900, Fujii Masao wrote:
>> On Wed, Sep 15, 2010 at 12:14 AM, Simon Riggs<simon(at)2ndquadrant(dot)com> wrote:
>>>
>>> Like latches, nice one.
>>>
>>> The way the loop in WalSender now happens it won't send any outstanding
>>> WAL if a shutdown is requested while it is waiting.
>>>
>>> That probably needs to change and we'd do similarly in other procs.
>>
>> Really? ISTM that walsender tries to send all outstanding WAL without
>> problems after it receives SIGUSR2. Am I missing something?
>
> For SIGUSR2, you're right.
>
> However, if the following clause is ever invoked, then the loop does
> have problems and we leave when not caught up.
>
> if (!PostmasterIsAlive(true))
> exit(1);
As the comment above that says, that's just an escape hatch if
postmaster dies unexpectedly for any reason. It won't happen in a normal
shutdown.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Wanner | 2010-09-15 06:48:38 | Re: bg worker: patch 1 of 6 - permanent process |
Previous Message | Fujii Masao | 2010-09-15 06:38:09 | Re: Latches, loop and exit |