Re: Kill specific connection - Mailing list pgsql-general

From Tom Lane
Subject Re: Kill specific connection
Date
Msg-id 16581.1158181294@sss.pgh.pa.us
Whole thread Raw
In response to Kill specific connection  (snacktime <snacktime@gmail.com>)
List pgsql-general
snacktime <snacktime@gmail.com> writes:
> What's a safe way to kill a specific connection to the database?  I'm
> testing some code that reconnects if a connection has timed out or
> gone bad and I need to simulate a connection that has gone away.

Disconnecting a network cable might be the easiest test.  Anything
involving a process kill is not a realistic test, because the kernel
will report connection closure to the other end, which is a luxury
you don't get in the real-world cases where this is an issue.

            regards, tom lane

pgsql-general by date:

Previous
From: snacktime
Date:
Subject: Kill specific connection
Next
From: Tony Caduto
Date:
Subject: Re: berkley sockets