Re: backend hangs at immediate shutdown

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: backend hangs at immediate shutdown
Дата
Msg-id 8144.1359592798@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: backend hangs at immediate shutdown  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: backend hangs at immediate shutdown  ("MauMau" <maumau307@gmail.com>)
Re: backend hangs at immediate shutdown  ("MauMau" <maumau307@gmail.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2013-01-31 08:27:13 +0900, Tatsuo Ishii wrote:
>> What about adding a caution to the doc something like:
>> "pg_ctl -m -i stop" may cause a PostgreSQL hang if native laguage support enabled.

> That doesn't entirely solve the problem, see quote and reply in
> 6845.1359561252@sss.pgh.pa.us

> I think adding errmsg_raw() or somesuch that doesn't allocate any memory
> and only accepts constant strings could solve the problem more
> completely, at the obvious price of not allowing translated strings
> directly.

I really doubt that this would make a measurable difference in the
probability of failure.  The OP's case looks like it might not have
occurred if we weren't translating, but (a) that's not actually proven,
and (b) there are any number of other, equally low-probability, reasons
to have a problem here.  Please note for instance that elog.c would
still be doing a whole lot of palloc's even if the passed strings were
not copied.

I think if we want to make it bulletproof we'd have to do what the
OP suggested and switch to SIGKILL.  I'm not enamored of that for the
reasons I mentioned --- but one idea that might dodge the disadvantages
is to have the postmaster wait a few seconds and then SIGKILL any
backends that hadn't exited.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: backend hangs at immediate shutdown
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: backend hangs at immediate shutdown