From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Massimo Dal Zotto <dz(at)cs(dot)unitn(dot)it>, PostgreSQL Hackers <hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] ERROR: infinite recursion in proc_exit |
Date: | 1999-11-06 20:40:29 |
Message-ID: | 2743.941920829@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-11-06 20:46:56 | Re: [HACKERS] New psql compile problem. |
Previous Message | Keith Parks | 1999-11-06 20:38:11 | New psql compile problem. |