> 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 [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
