Re: pg_cancel_backend and pg_terminate_backend

Поиск
Список
Период
Сортировка
От MichaelDBA
Тема Re: pg_cancel_backend and pg_terminate_backend
Дата
Msg-id 8d16a5ba-a4bc-f139-5f25-daef5ae85340@sqlexec.com
обсуждение исходный текст
Ответ на pg_cancel_backend and pg_terminate_backend  (Wells Oliver <wells.oliver@gmail.com>)
Ответы pg_cancel_backend and pg_terminate_backend  ("Wetmore, Matthew (CTR)" <Matthew.Wetmore@express-scripts.com>)
Список pgsql-admin
My experience with the older PG versions is that I couldn't stop a query sometimes with pg_cancel_backend, so I had to resort to pg_terminate_backend.

Regards,
Michael Vitale


Wells Oliver wrote on 4/19/2023 3:41 PM:
I usually prefer pg_cancel_backend because it seems.. nicer, but lately I've had a troublesome user who leaves transactions open and I've scripted up a call to pg_terminate_backend after 60 minutes in an idle transaction. It works well.

Question: is there any server impact beyond that user's transaction when calling pg_terminate_backend? I feel like there _used_ to be, maybe in PG9, where I recall maybe seeing a server disconnect or something when using terminate.

Just curious about this approach. Thanks.

--


Regards,

Michael Vitale

Michaeldba@sqlexec.com

703-600-9343 


Вложения

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

Предыдущее
От: Wells Oliver
Дата:
Сообщение: pg_cancel_backend and pg_terminate_backend
Следующее
От: "Wetmore, Matthew (CTR)"
Дата:
Сообщение: pg_cancel_backend and pg_terminate_backend