Re: Handling idle connections

From: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Rui DeSousa <rui(at)crazybean(dot)net>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Handling idle connections
Date: 2023-09-26 14:04:29
Message-ID: CAJk5AtbjuM9UYVgFm=aQvjgO9SWaBRejTYWNG9N=5ALV=2d+EA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

With regards to handling idle connections, what advice can I give to
application team ?

I am assuming like tell them "check sessions are closed properly" like dat?

On Mon, 25 Sep, 2023, 10:54 PM Jeff Janes, <jeff(dot)janes(at)gmail(dot)com> wrote:

> On Mon, Sep 25, 2023 at 12:27 AM Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
> wrote:
>
>> Yes, i came here only after doing a lot of research on internet. I am
>> doing most of these things already.
>>
>> I need help on two things now.
>>
>> 1. I see lot of idle connections where application_name is blank and also
>> query is blank, i am identifying only with user. In this case how do I
>> identify which application is using idle connection?
>>
>
> Are you querying pg_stat_activity as a superuser, or at least a user who
> is a member of pg_monitor? If not, many fields will be uninformative due
> to security reasons. Although "query" shouldn't be literally blank, it
> should be the string '<insufficient privilege>', but maybe you
> misinterpreted that as being blank and being filled-in client-side.
>
> If you are querying it as the superuser and still don't know who is
> connecting to your database, maybe it is time to change the password and be
> more diligent about who you hand it out to.
>
> Cheers,
>
> Jeff
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Janes 2023-09-26 14:55:32 Re: Handling idle connections
Previous Message Zhaoxun Yan 2023-09-26 02:39:26 pg_rewind: ERROR: could not fetch remote file "global/pg_control": ERROR: permission denied