Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 0A4744764CE for ; Thu, 30 Jan 2003 14:06:32 -0500 (EST) Received: from gsy_sbs_1.cisx.com (unknown [213.133.202.58]) by postgresql.org (Postfix) with ESMTP id 12596476356 for ; Thu, 30 Jan 2003 14:06:31 -0500 (EST) Received: from DEMOLITION ([192.168.100.22]) by gsy_sbs_1.cisx.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id D931AM2Z; Thu, 30 Jan 2003 18:59:59 -0000 Message-ID: <005301c2c893$4ebd1f00$1664a8c0@DEMOLITION> From: "Donald Fraser" To: Subject: Lost connections Date: Thu, 30 Jan 2003 19:10:47 -0000 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0050_01C2C893.4B868510" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/343 X-Sequence-Number: 7185 This is a multi-part message in MIME format. ------=_NextPart_000_0050_01C2C893.4B868510 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Version: PostgreSQL 7.3.1 on i686-pc-linux-gnu, compiled by GCC=20 I was testing what would happen to a connection on the server when a client= disconnects from the database via a lost network / internet connection. To test this scenario out I connected with a Java application and then simp= ly unplugged my network cable. I then shut down my application before recon= necting the network cable.=20 I then viewed the postgres processes running on the database server, which = revealed the following: postgres 12304 0.0 1.0 7416 1300 ? S Jan20 0:00 /usr/bin/postmaster -p 5432 postgres 12307 0.0 0.0 8280 52 ? S Jan20 0:00 postgres: stats buffer proc= ess=20 postgres 12309 0.0 0.1 7332 232 ? S Jan20 0:00 postgres: stats collector p= rocess=20 postgres 822 0.0 2.5 8100 3292 ? S 18:31 0:00 postgres: test_user test_da= ta 192.168.100.22 idle As you can see there still existed the connection to the database that I ha= d established from the Java app (from my computer 192.168.100.22). My questions are: 1) How as an administrator can I tell which connections are lost and which = are not so I can shut down the appropriate processes? 2) Is there a way of connecting to the server with client applications that= can avoid this situation. That is can the client software do something ext= ra when connecting such as additional parameters, keep alive socket options= ... to avoid this scenario? Thanks in advance Donald Fraser ------=_NextPart_000_0050_01C2C893.4B868510 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Version: PostgreSQL 7.3.1 on i686-pc-linux= -gnu,=20 compiled by GCC
 
I was testing what would happen to a conne= ction on=20 the server when a client disconnects from the database via a lost network /= =20 internet connection.
To test this scenario out I connected= with a=20 Java application and then simply unplugged my network cable. I then shut do= wn my=20 application before reconnecting the network cable.
I then viewed the postgres processes runni= ng on the=20 database server, which revealed the following:
 
postgres 12304 0.0 1.0 7416 1300 ?= S Jan20=20 0:00 /usr/bin/postmaster -p 5432
postgres 12307 0.0 0.0 8280 &= nbsp; 52=20 ? S Jan20 0:00 postgres: stats buffer process
postgres 12309 0.0 0.1 7332  = 232 ? S=20 Jan20 0:00 postgres: stats collector process
postgres   822 0.0 2.5 8= 100 3292=20 ? S 18:31 0:00 postgres: test_user test_data 192.168.100.22=20 idle
 
As you can see there still existed the con= nection=20 to the database that I had established from the Java app (from my computer= =20 192.168.100.22).
 
My questions are:
1) How as an administrator can I tell whic= h=20 connections are lost and which are not so I can shut down the appropriate= =20 processes?
2) Is there a way of connecting to the ser= ver=20 with client applications that can avoid this situation. That is can th= e=20 client software do something extra when connecting such as additional=20 parameters, keep alive socket options... to avoid this scenario?
 
Thanks in advance
Donald Fraser
------=_NextPart_000_0050_01C2C893.4B868510--