Re: [HACKERS] ERROR: infinite recursion in proc_exit - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] ERROR: infinite recursion in proc_exit
Date
Msg-id 199911062048.PAA08634@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] ERROR: infinite recursion in proc_exit  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.
> 

Oh, well.  I tried.  Code is better than it used to be at least.

--  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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] New psql compile problem.
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Arrays broken on temp tables