Re: Discard All in pgbouncer

From: Samed YILDIRIM <samed(at)reddoc(dot)net>
To: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Discard All in pgbouncer
Date: 2023-10-09 14:12:22
Message-ID: CAAo1mbkLHPZYr7AGthoSg3pFf14LLNbEbZdCJUUoVxm6Bd1jjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Rajesh,

DISCARD ALL is the query that is executed by PgBouncer in order to sanitise
a database session before assigning it to another client. If you see this
query in pg_stat_activity and status of the session is idle, most probably
it is ok. Probably what you see is the last executed query for the session.
And the session is idle and waiting to be assigned to a client. :)

Best regards.
Samed YILDIRIM

On Mon, 9 Oct 2023, 17:07 Rajesh Kumar, <rajeshkumar(dot)dba09(at)gmail(dot)com> wrote:

> Hi,
>
> I could see queries like DISCARD ALL is idle for more than 5minutes (we
> are using pgbouncer).
>
> Why is it idle for more than 5mns? I read about pgbouncer and could not
> understand this thing. If resetting a connection using query becomes one
> idle connection, I don't understand the pooling system here
>
> Plz help
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron 2023-10-09 14:13:11 Re: Discard All in pgbouncer
Previous Message Scott Ribe 2023-10-09 14:11:05 Re: Discard All in pgbouncer