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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: ctrl-c - is it safe to kill a query?
Дата
Msg-id 201002082249.o18Mn6V20472@momjian.us
обсуждение исходный текст
Ответ на ctrl-c - is it safe to kill a query?  ("Mark Steben" <msteben@autorevenue.com>)
Список 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 по дате отправления:

Предыдущее
От: Rosser Schwarz
Дата:
Сообщение: Re: Best Replication Tool
Следующее
От: Marc Fromm
Дата:
Сообщение: copy table