Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id DA7DA475A8E for ; Wed, 17 Apr 2002 23:47:12 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g3I3lDF05899; Wed, 17 Apr 2002 23:47:13 -0400 (EDT) To: "Jeff Madison" Cc: pgsql-admin@postgresql.org Subject: Re: Connection terminates but postmaster proc lives on...? In-reply-to: <007201c1e63e$aad57040$58c2d0cd@JEFF> References: <007201c1e63e$aad57040$58c2d0cd@JEFF> Comments: In-reply-to "Jeff Madison" message dated "Wed, 17 Apr 2002 12:35:37 -0600" Date: Wed, 17 Apr 2002 23:47:13 -0400 Message-ID: <5896.1019101633@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/168 X-Sequence-Number: 4056 "Jeff Madison" writes: > ... What we are seeing is when > people terminate the application in the middle of a query many times > postmaster does not see the connection terminate or at least ignores it > and then proceeds to take a large amount of system resources and never > dies. As a general rule, the backend will not notice a connection closure until it next tries to read from the connection. If you issue some query that takes a long time to compute, and then give up and abort your client, the query will still run. If you're not sure what query you are running, you could attach to one of the CPU-hogging backends with gdb and issue "p debug_query_string" to see what it's working on. regards, tom lane