pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ctrl-c - is it safe to kill a query?
2+ messages / 2 participants
[nested] [flat]

* ctrl-c - is it safe to kill a query?
@ 2010-02-08 15:40  Mark Steben <msteben@autorevenue.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Mark Steben @ 2010-02-08 15:40 UTC (permalink / raw)
  To: pgsql-admin

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 
 <http://www.autorevenue.com; @utoRevenueR - "Keeping Customers Close" 
95D Ashley Ave, West Springfield, MA 01089 
413.243.4800 x1512 (Phone) |413.732-1824 (Fax) 



 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: ctrl-c - is it safe to kill a query?
@ 2010-02-08 22:49  Bruce Momjian <bruce@momjian.us>
  parent: Mark Steben <msteben@autorevenue.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2010-02-08 22:49 UTC (permalink / raw)
  To: Mark Steben <msteben@autorevenue.com>; +Cc: 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. +



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2010-02-08 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08 15:40 ctrl-c - is it safe to kill a query? Mark Steben <msteben@autorevenue.com>
2010-02-08 22:49 ` Bruce Momjian <bruce@momjian.us>

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