Re: [HACKERS] ERROR: infinite recursion in proc_exit

Поиск
Список
Период
Сортировка
От Massimo Dal Zotto
Тема Re: [HACKERS] ERROR: infinite recursion in proc_exit
Дата
Msg-id 199911060045.BAA03089@nikita.dz.net
обсуждение исходный текст
Ответ на Re: [HACKERS] ERROR: infinite recursion in proc_exit  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] ERROR: infinite recursion in proc_exit  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
> 
> Hmm.  If that trace is from 6.5 code, then postgres.c should certainly
> be calling proc_exit after the recv() fails.  I wonder if proc_exit is
> returning because proc_exit_inprogress is nonzero?  proc_exit's use of
> elog(ERROR) does look mighty bogus to me --- that path could possibly
> cause a recursion just like this, but how did the code get into it to
> begin with?

The proc_exit_inprogress stuff was added by me after I found some backends
doing exactly that sort of infinite recursion after a socket recv error.
It doesn't correct the original error but at least il will exit the backend
after 10 iterations. The elog(ERROR) might be bogus in this context, but how
can you otherwise notify the error? Maybe a better solution could be this:
if (proc_exit_inprogress++ == 9)    elog(ERROR, "infinite recursion in proc_exit");if (proc_exit_inprogress >= 9)
gotoexit;
 

-- 
Massimo Dal Zotto

+----------------------------------------------------------------------+
|  Massimo Dal Zotto               email: dz@cs.unitn.it               |
|  Via Marconi, 141                phone: ++39-0461534251              |
|  38057 Pergine Valsugana (TN)      www: http://www.cs.unitn.it/~dz/  |
|  Italy                             pgp: finger dz@tango.cs.unitn.it  |
+----------------------------------------------------------------------+


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

Предыдущее
От: Ryan Kirkpatrick
Дата:
Сообщение: Re: [HACKERS] PostgreSQL 6.5.3 built, but not released ...
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] New version of psql