Re: ctrl-c - is it safe to kill a query? - Mailing list pgsql-admin

From Bruce Momjian
Subject Re: ctrl-c - is it safe to kill a query?
Date
Msg-id 201002082249.o18Mn6V20472@momjian.us
Whole thread Raw
In response to ctrl-c - is it safe to kill a query?  ("Mark Steben" <msteben@autorevenue.com>)
List 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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

pgsql-admin by date:

Previous
From: Rosser Schwarz
Date:
Subject: Re: Best Replication Tool
Next
From: Marc Fromm
Date:
Subject: copy table