Re: [HACKERS] ERROR: infinite recursion in proc_exit
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] ERROR: infinite recursion in proc_exit |
Дата | |
Msg-id | 199911061945.OAA04497@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] ERROR: infinite recursion in proc_exit (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] ERROR: infinite recursion in proc_exit
|
Список | pgsql-hackers |
> That isn't going to make things any better, because it's still laboring > under the same basic oversight: elog(ERROR) does not return to the > caller, it returns control to the main loop. Thus, having proc_exit > call elog(ERROR) is simply *guaranteed* to create a failure. proc_exit > must not allow control to return anywhere, under any circumstances, > because it is used as the final recourse when things are too screwed up > to consider continuing. Massimo pointed out some problems in my fix. The new code is: if (++proc_exit_inprogress == 9) elog(ERROR, "infinite recursion in proc_exit"); if (proc_exit_inprogress >=9) goto exit; /* ---------------- * if proc_exit_inprocess > 1, then it means that we * are being invokedfrom within an on_exit() handler * and so we return immediately to avoid recursion. * ---------------- */ if (proc_exit_inprogress > 1) return; -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: