Skip site navigation (1) Skip section navigation (2)

Re: ctrl-c - is it safe to kill a query?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Mark Steben <msteben(at)autorevenue(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: ctrl-c - is it safe to kill a query?
Date: 2010-02-08 22:49:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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(at)momjian(dot)us>

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

In response to

pgsql-admin by date

Next:From: Marc FrommDate: 2010-02-08 23:38:11
Subject: copy table
Previous:From: Rosser SchwarzDate: 2010-02-08 22:38:54
Subject: Re: Best Replication Tool

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group