Re: [HACKERS] ERROR: infinite recursion in proc_exit

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] ERROR: infinite recursion in proc_exit
Дата
Msg-id 2743.941920829@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] ERROR: infinite recursion in proc_exit  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] ERROR: infinite recursion in proc_exit  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
>     /* ----------------
>      *  if proc_exit_inprocess > 1, then it means that we
>      *  are being invoked from within an on_exit() handler
>      *  and so we return immediately to avoid recursion.  
>      * ----------------
>      */
>     if (proc_exit_inprogress > 1)  
>         return;

No, no, no, noooo!!!

proc_exit MUST NOT RETURN.  EVER, UNDER ANY CIRCUMSTANCES.

If it does, that means that elog(STOP) can return under some
circumstances.  The callers of elog() are not expecting that,
and they are likely to screw things up even worse if elog returns
control unexpectedly.

AFAICS, this set of problems cannot be fixed by localized patching in
proc_exit.  We have to globally change the way in which errors are
processed after proc_exit has begun execution.
        regards, tom lane


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

Предыдущее
От: Keith Parks
Дата:
Сообщение: New psql compile problem.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] New psql compile problem.