pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Handling idle connections
Date: Sun, 24 Sep 2023 07:19:44 -0600
Message-ID: <FE25C43F-16C6-43B2-A2C6-C80347C9E6F3@elevated-dev.com> (raw)
In-Reply-To: <CAJk5AtZ5XNhvwJqE3MK1SZ5ufHraqtN7EsR4WgadXfvdrgyNOA@mail.gmail.com>
References: <CAJk5Ata=NXO46e7RcS-CxEXvroz=-fojS+XzpW-Bty+G-sx51A@mail.gmail.com>
	<CF42B9B4-89EC-4F5C-A49B-A3F9A48F24F2@elevated-dev.com>
	<CAJk5AtZ5XNhvwJqE3MK1SZ5ufHraqtN7EsR4WgadXfvdrgyNOA@mail.gmail.com>

> On Sep 24, 2023, at 7:03 AM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
> 
> Could u give me a tip on how to figure out where they are coming and what do u mean exactly by saying "fixing" them

Look at pg_stat_activity. There's the application_name column--if your apps are not setting that, the query column shows last/current query and that is sometimes a clue. (Also, if your clients are not setting application name, fix them.)

If you don't want client applications leaving connections idle, then clients should release connections when not using them.






view thread (15+ messages)  latest in thread

Message-ID: <FE25C43F-16C6-43B2-A2C6-C80347C9E6F3@elevated-dev.com>
Permalink:  ../FE25C43F-16C6-43B2-A2C6-C80347C9E6F3@elevated-dev.com/
Also on:    postgresql.org/message-id/FE25C43F-16C6-43B2-A2C6-C80347C9E6F3@elevated-dev.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scott_ribe@elevated-dev.com, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Handling idle connections
  In-Reply-To: <FE25C43F-16C6-43B2-A2C6-C80347C9E6F3@elevated-dev.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox