Craig Ringer <craig@postnewspapers.com.au> writes:
> Greg Stark wrote:
>> Also it requires the server to
>> periodically take time out from processing the query to do this.
> This aspect I'm not to bothered about. I doubt it'd cost anything
> detectable if done a few times a minute - unless it required
> restructuring of query processing to accomodate it. In that case, no way.
Well, it would. Your suggestion of doing it in a signal handler is a
nonstarter --- signal handlers can't really do anything very useful
for fear of messing up whatever processing they interrupted.
The earlier part of the discussion was focused on getting the kernel
to actively tell us when the connection had dropped. That would be
workable if we found a way to request it, but I think we'd run out of
options :-(
regards, tom lane