Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)

From: Hitoshi Harada <umi(dot)tanuki(at)gmail(dot)com>
To: MauMau <maumau307(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)
Date: 2013-06-21 07:19:51
Message-ID: CAP7QgmnSW+ktWRnixXrt4g958NjqjR7Q1XNYDObmJp27npjW=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 20, 2013 at 3:40 PM, MauMau <maumau307(at)gmail(dot)com> wrote:
>
> Here, "reliable" means that the database server is certainly shut
>>> down when pg_ctl returns, not telling a lie that "I shut down the
>>> server processes for you, so you do not have to be worried that some
>>> postgres process might still remain and write to disk". I suppose
>>> reliable shutdown is crucial especially in HA cluster. If pg_ctl
>>> stop -mi gets stuck forever when there is an unkillable process (in
>>> what situations does this happen? OS bug, or NFS hard mount?), I
>>> think the DBA has to notice this situation from the unfinished
>>> pg_ctl, investigate the cause, and take corrective action.
>>>
>>
>> So you're suggesting that keeping postmaster up is a useful sign that
>> the shutdown is not going well? I'm not really sure about this. What
>> do others think?
>>
>
> I think you are right, and there is no harm in leaving postgres processes
> in unkillable state. I'd like to leave the decision to you and/or others.
>
>
+1 for leaving processes, not waiting for long (or possibly forever,
remember not all people are running postgres on such cluster ware). I'm
sure some users rely on the current behavior of immediate shutdown. If
someone wants to ensure processes are finished when pg_ctl returns, is it
fast shutdown, not immediate shutdown? To me the current immediate
shutdown is reliable, in that it without doubt returns control back to
terminal, after killing postmaster at least.

Thanks,
--
Hitoshi Harada

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2013-06-21 07:31:06 Re: Review: UNNEST (and other functions) WITH ORDINALITY
Previous Message Dean Rasheed 2013-06-21 07:02:44 Re: Review: UNNEST (and other functions) WITH ORDINALITY