Re: Idea: quicker abort after loss of client connection - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Idea: quicker abort after loss of client connection
Date
Msg-id 200106110320.f5B3KFG25108@candle.pha.pa.us
Whole thread Raw
In response to Idea: quicker abort after loss of client connection  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@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: ANDREW PERRIN
Date:
Subject: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. Standards
Next
From: Jan Wieck
Date:
Subject: Re: Baby girl