Re: pg_cancel_backend and pg_terminate_backend

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: Thomas Kellerer <shammat(at)gmx(dot)net>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: pg_cancel_backend and pg_terminate_backend
Date: 2023-04-19 20:13:18
Message-ID: CAOC+FBW=KK04qkY6r0ueEX6JnKK4-8u365uuOrf3UM1UrPNbxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Because longer idle transactions are used by a bunch of processes, but it's
a certain group of users I don't want having idle transactions, so here we
are...

On Wed, Apr 19, 2023 at 1:11 PM Thomas Kellerer <shammat(at)gmx(dot)net> wrote:

> 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?
>
>
>
>

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Benjamin Leis 2023-04-19 20:13:35 Re: pg_cancel_backend and pg_terminate_backend
Previous Message Thomas Kellerer 2023-04-19 20:10:59 Re: pg_cancel_backend and pg_terminate_backend