From msteben@autorevenue.com Mon Feb 8 15:41:19 2010 Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 144B463261A for ; Mon, 8 Feb 2010 11:41:19 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 03840-02 for ; Mon, 8 Feb 2010 15:40:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.autorevenue.com (mail.autorevenue.com [208.178.167.106]) by mail.postgresql.org (Postfix) with ESMTP id B5764632416 for ; Mon, 8 Feb 2010 11:41:07 -0400 (AST) Received: (qmail 17649 invoked from network); 8 Feb 2010 10:46:23 -0500 Received: from unknown (HELO dei26g028534) (msteben@10.10.6.184) by mail.autorevenue.com with SMTP; 8 Feb 2010 10:46:23 -0500 From: "Mark Steben" To: Subject: ctrl-c - is it safe to kill a query? Date: Mon, 8 Feb 2010 10:40:59 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_007B_01CAA8AB.343FF080" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: Acqo1RzJAqsZqhO2QyqAIXMigTEDgg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Message-Id: <20100208154107.B5764632416@mail.postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.586 tagged_above=-10 required=5 tests=AWL=-0.588, BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201002/56 X-Sequence-Number: 33659 This is a multi-part message in MIME format. ------=_NextPart_000_007B_01CAA8AB.343FF080 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. Good to know for future reference. Thank you. Mark Steben | Database Administrator @utoRevenueR - "Keeping Customers Close" 95D Ashley Ave, West Springfield, MA 01089 413.243.4800 x1512 (Phone) |413.732-1824 (Fax) ------=_NextPart_000_007B_01CAA8AB.343FF080 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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.

 

Good to know for future reference.  Thank = you.

 

 

Mark = Steben | Database = Administrator 
@utoRevenue® - = "Keeping Customers Close" 
95D Ashley Ave, West Springfield, = MA 01089
413.243.4800 = x1512 (Phone) |413.732-1824 (Fax)

 

------=_NextPart_000_007B_01CAA8AB.343FF080-- From bruce@momjian.us Mon Feb 8 22:49:21 2010 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. +