pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Mark Steben <msteben@autorevenue.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: ctrl-c - is it safe to kill a query?
Date: Mon, 8 Feb 2010 17:49:06 -0500 (EST)
Message-ID: <201002082249.o18Mn6V20472@momjian.us> (raw)
In-Reply-To: <20100208154107.B5764632416@mail.postgresql.org>

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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +



view thread (2+ messages)

Message-ID: <201002082249.o18Mn6V20472@momjian.us>
Permalink:  ../201002082249.o18Mn6V20472@momjian.us/
Also on:    postgresql.org/message-id/201002082249.o18Mn6V20472@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: bruce@momjian.us, msteben@autorevenue.com
  Subject: Re: ctrl-c - is it safe to kill a query?
  In-Reply-To: <201002082249.o18Mn6V20472@momjian.us>
  References: <20100208154107.B5764632416@mail.postgresql.org> <201002082249.o18Mn6V20472@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox