Cancel running query if it is detected that the connection to the client is
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 9 Dec 2011 09:37:21 +0000 (11:37 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 9 Dec 2011 12:21:36 +0000 (14:21 +0200)
commit5d8a894e3095b2f602e901c19689f3176bf20543
treeb917c7012c64edb02883ac4e3a2ed59368cbc06e
parentd5f23af6bfbc454e86dd16e5c7a0bfc0cf6189d0
Cancel running query if it is detected that the connection to the client is
lost. The only way we detect that at the moment is when write() fails when
we try to write to the socket.

Florian Pflug with small changes by me, reviewed by Greg Jaskiewicz.
src/backend/libpq/pqcomm.c
src/backend/tcop/postgres.c
src/backend/utils/init/globals.c
src/include/miscadmin.h