Re: Idea: quicker abort after loss of client connection

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: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Idea: quicker abort after loss of client connection
Date: 2001-06-11 03:20:15
Message-ID: 200106110320.f5B3KFG25108@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> It occurs to me that a fairly safe way to abort after loss of connection
> would be for pq_flush or pq_recvbuf to set QueryCancel when they detect
> a communications problem. This would not immediately abort the query in
> progress, but would ensure a cancel at the next safe time in the
> per-tuple loop. You wouldn't get very much more output before that
> happened, typically.
>
> Thoughts? Is there anything about this that might be unsafe? Should
> QueryCancel be set after *any* failure of recv() or send(), or only
> if certain errno codes are detected (and if so, which ones)?

Seems like a good idea to set Cancel.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-06-11 04:28:28 Re: something smells bad
Previous Message Bruce Momjian 2001-06-11 03:15:42 Re: BLOBs