Re: Client failure allows backed to continue

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Client failure allows backed to continue
Date: 2003-01-28 03:34:08
Message-ID: 200301280334.h0S3Y8329633@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > As part of the training class I did, some people tested what happens
> > when the client allocates tons of memory to store a result and aborts.
>
> > What we found was that though elog was properly called:
>
> > elog(COMMERROR, "pq_recvbuf: recv() failed: %m");
>
> > (I think that was the message.) the backend did not exit and kept
> > eating CPU. I think the problem is that the elog code only exits on
> > ERROR, not COMMERROR. Is there some way to fix this?
>
> There's been talk of setting the QueryCancel flag after detecting a
> client communication failure ... but no one has ever done the legwork
> to see if that works nicely, or what downsides it might have.

Why is COMMERROR not doing the longjump like ERROR?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-28 03:43:25 Re: Client failure allows backed to continue
Previous Message Tom Lane 2003-01-28 03:31:45 Re: Client failure allows backed to continue