Re: Kill specific connection

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: snacktime <snacktime(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Kill specific connection
Date: 2006-09-13 21:01:34
Message-ID: 16581.1158181294@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

snacktime <snacktime(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Caduto 2006-09-13 21:15:02 Re: berkley sockets
Previous Message snacktime 2006-09-13 20:55:00 Kill specific connection