Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3F81D633E01 for ; Mon, 8 Feb 2010 18:49:21 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91755-05 for ; Mon, 8 Feb 2010 22:49:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 96B99633DAE for ; Mon, 8 Feb 2010 18:49:10 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o18Mn6V20472; Mon, 8 Feb 2010 17:49:06 -0500 (EST) From: Bruce Momjian Message-Id: <201002082249.o18Mn6V20472@momjian.us> Subject: Re: ctrl-c - is it safe to kill a query? In-Reply-To: <20100208154107.B5764632416@mail.postgresql.org> To: Mark Steben Date: Mon, 8 Feb 2010 17:49:06 -0500 (EST) CC: pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/58 X-Sequence-Number: 33661 Mark Steben wrote: > Hi folks, > > > > We are running psql 8.3.7 and linux 2.6.9-78.0.17.ELsmp > > > > We had a situation this weekend where someone was running an update > > On the psql command line and had to kill it. > > > > It is considered 'best practice' to use cntrl-c to do so? > > Or is there a better way? The transaction did roll back. Sure, that is fine. It doesn't hurt anything. There is also a way to do it from another session using using pg_cancel_backend(). -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. +