Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 678572E0057 for ; Wed, 7 May 2008 20:29:38 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75427-02 for ; Wed, 7 May 2008 20:29:27 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by developer.postgresql.org (Postfix) with ESMTP id E93CB2E0052 for ; Wed, 7 May 2008 20:29:33 -0300 (ADT) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id D513F106B4C for ; Wed, 7 May 2008 19:29:31 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 07 May 2008 19:29:31 -0400 X-Sasl-enc: SspAQGM14KNcEzWlcq4fMwOkmlnVK6sSjxm757Ek31vk 1210202971 Received: from [10.128.0.117] (unknown [218.30.180.194]) by mail.messagingengine.com (Postfix) with ESMTPSA id B72AE77 for ; Wed, 7 May 2008 19:29:30 -0400 (EDT) Message-ID: <48223B31.4090206@fastmail.net> Date: Thu, 08 May 2008 07:28:49 +0800 From: Darren Reed Reply-To: darrenr@fastmail.net User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: "pgsql-admin@postgresql.org" Subject: postgres doesn't detect other end of the unix socket is gone... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/57 X-Sequence-Number: 29141 It would appear that sometimes, when a disconnect a unix stream (ie perl DBI) from postgres in a forceful manner (^C), postgres doesn't appear to notice and keeps processing the transaction rather than aborting it. As an example, I currently see the following open files: postgres postgres 28780 7* unix stream c3653d80 <-> c2d6d7c0 postgres postgres 23751 7* unix stream c2aeda80 <-> c3615540 postgres postgres 12631 7* unix stream c35e3640 <-> c2ac1000 postgres postgres 586 7* unix stream c35ce400 postgres postgres 29011 5* unix stream c2adb900 The last two are: 586 ? Ds 0:00.00 postgres: postgres postgres [local] UPDATE 29011 ttyp0- IW 0:00.00 /usr/pkg/bin/postgres -D /home/postgres/db In this case, it would appear that 586 hasn't noticed anything strange happening. Should it have? Will this problem go away if I use TCP rather than unix streams? Or is this a bug of the variety that when postgres is deep inside an UPDATE, doing lots of disk I/O, it never checks to see if it should abort because the client has gone? Actually, I can see aborting being a bug too...is there a way to control the behaviour here? Darren