Re: pg_cancel_backend and pg_terminate_backend - Mailing list pgsql-admin

From Thomas Kellerer
Subject Re: pg_cancel_backend and pg_terminate_backend
Date
Msg-id c43689c6-1aa3-9258-09a7-de8046699dc5@gmx.net
Whole thread Raw
In response to pg_cancel_backend and pg_terminate_backend  (Wells Oliver <wells.oliver@gmail.com>)
Responses Re: pg_cancel_backend and pg_terminate_backend  (Benjamin Leis <benleis1@gmail.com>)
Re: pg_cancel_backend and pg_terminate_backend  (Wells Oliver <wells.oliver@gmail.com>)
List pgsql-admin
Wells Oliver schrieb am 19.04.2023 um 21:41:
> 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.

Why don't you use the idle_in_transaction_session_timeout to do this automatically?




pgsql-admin by date:

Previous
From: Wells Oliver
Date:
Subject: Re: pg_cancel_backend and pg_terminate_backend
Next
From: Wells Oliver
Date:
Subject: Re: pg_cancel_backend and pg_terminate_backend