Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D75F59FB3A0 for ; Mon, 29 Jan 2007 23:44:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 35454-10 for ; Mon, 29 Jan 2007 23:43:53 -0400 (AST) X-Greylist: delayed 00:10:12.475715 by SQLgrey-1.7.4 Received: from ironport2.cable.net.co (ironport2.cable.net.co [200.118.2.78]) by postgresql.org (Postfix) with ESMTP id 660979FB298 for ; Mon, 29 Jan 2007 23:43:59 -0400 (AST) Received: from epicac.cable.net.co ([200.118.2.50]) by ironport2.cable.net.co with ESMTP; 29 Jan 2007 22:33:41 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswMAPRLvkXIdgIyh2dsb2JhbACEAIpPAQEBCA4q X-IronPort-AV: i="4.13,254,1167627600"; d="scan'208"; a="98840319:sNHT26962752" Received: from dynamic-ip-cr20011869155.cable.net.co ([200.118.69.155]) by epicac.cable.net.co (Sun Java System Messaging Server 6.2-7.06 (built Oct 6 2006)) with ESMTPA id <0JCN007XK4EHIP90@epicac.cable.net.co> for pgsql-admin@postgresql.org; Mon, 29 Jan 2007 22:25:30 +0500 (GMT) Date: Mon, 29 Jan 2007 22:33:34 -0500 From: "Eduardo J. Ortega" Subject: Re: Terminating a query that appears to be hung In-reply-to: <006601c743fe$31e824c0$79587cca@ITLaptop> To: pgsql-admin@postgresql.org Message-id: <200701292233.36805.ejortegau@cable.net.co> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-disposition: inline References: <006601c743fe$31e824c0$79587cca@ITLaptop> User-Agent: KMail/1.9.5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.944 tagged_above=0 required=5 tests=AWL, BAYES_40, INVALID_TZ_GMT X-Spam-Level: * X-Archive-Number: 200701/270 X-Sequence-Number: 24426 You can also kill the postgres process corresponding to the hung query. do NOT kill -9. Only kill. Postgres will rollback any uncomitted transaction and finish that connection gracefully. On Monday 29 January 2007 18:35, Phillip Smith wrote: > Can youo be a bit more specific...? What client? > > Psql should terminate the connection when it exist. pgAdmin will close it > when you exit the ap, or if you choose 'Disconnect' from the menu. In PHP > you'll need to call pg_close function... Every 'client' will have a > different method... > > -----Original Message----- > From: pgsql-admin-owner@postgresql.org > [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Robert D Oden > Sent: Tuesday, 30 January 2007 2:03 AM > To: PgSQL ADMIN > Subject: [ADMIN] Terminating a query that appears to be hung > > Is there a way to terminate a client session without having to restart > Postgres. > > Thanks -- Eduardo J. Ortega - Linux user #222873 "No fake - I'm a big fan of konqueror, and I use it for everything." -- Linus Torvalds