Cancelling a query from Python

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Cancelling a query from Python
Дата
Msg-id CA+mi_8bpm6u0qwe-h=Zpo2ZF=eo52ij5tijuR1grsCgpJA+ocQ@mail.gmail.com
обсуждение исходный текст
Список psycopg
As you may have experienced, cancelling a long running query from
Python is not easy: ctrl-c doesn't work and it usually takes a
pg_cancel_backend from another connection.

After a request in the bug tracking, here is a recipe to allow queries
to be stopped by a ctrl-c in interactive sessions.

http://initd.org/psycopg/articles/2014/07/20/cancelling-postgresql-statements-python/

Hope it helps.

-- Daniele


В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Psycopg2 unable to timeout
Следующее
От: Damian Dimmich
Дата:
Сообщение: JSONB marshalling