Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql9gB-001Urn-Np for pgsql-admin@arkaria.postgresql.org; Tue, 26 Sep 2023 15:08:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ql9gA-00ChjG-0N for pgsql-admin@arkaria.postgresql.org; Tue, 26 Sep 2023 15:08:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql9g9-00Chiw-J5 for pgsql-admin@lists.postgresql.org; Tue, 26 Sep 2023 15:08:49 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ql9g6-006kwW-QK for pgsql-admin@lists.postgresql.org; Tue, 26 Sep 2023 15:08:48 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3920063888; Tue, 26 Sep 2023 15:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1695740893; bh=yhqK7QBO4xJJ/VG8dxUZ6vXtxZYHmbjJJXqxsH6mrYw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=DO+6eTJAfrvFMSFkO/BP4oVslhULFMIM08dt//J+iwokwSnAjebhwPumrlybH6Ob3 nVoDOeLuRW17igCQKzaTs+yW0bHLDiFDBs4dyFd0xccnqx8/kiQ5UAwclnmtzm+7Xz KtxVs5p31jLEkE+poyXvwHfDcTWeQUeMIudUjN6W87I2VNMX3zbsPSZoIq1KKZXCqq 1g16FAWf041PAz4QOseguwxJRw33Ngi2ESIRVIo8rdhWnqyZhruTbNAvhPJr9o4TVB Io5cIdsXnJR6zV3VoQy+AggMjq8IQ7co8JRWDIyf8Lczj4c9+Wk1ruLVOULBeQ3Uca gNgotJktHiejw== X-Virus-Scanned: Debian amavisd-new at emo09-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo09-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dxGlWPytJ5Ap; Tue, 26 Sep 2023 15:08:12 +0000 (UTC) Received: from smtpclient.apple (unknown [165.140.184.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 9773F63887; Tue, 26 Sep 2023 15:08:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=elevated-dev.com; s=easymail; t=1695740892; bh=yhqK7QBO4xJJ/VG8dxUZ6vXtxZYHmbjJJXqxsH6mrYw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=4FmhKGs3eh5uT+V9HmUW9HEbnvm5CO++2PAx229KKS6oPKJ700/JDjbf74QxjuRKG 6BJ3/evUgGnqMp9EQCfCKEJYYOn++GNZUYxQLgdJledYVgqQlXtFKT7iShB9e/4ot7 QmFwZy7a3da1Kh+j8bZAY5/mFeIhX/lHGMKOXm6B9z3c0x4U/q/a/fGabgCT3KvvYV eLvehyIoDFbXIISpxoQobqAK2Vlv2mLyd+x+vANSDWlW04YlxGDF5t46OlUamFxr/i /iQtM5m3p06vNyqrvDU41ywCuz2x6sKO0MXhx4qYsduV1zX+5O950nuSamIYo4f3tb 5WS1ZipbWAlmg== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: Handling idle connections From: Scott Ribe In-Reply-To: Date: Tue, 26 Sep 2023 09:08:01 -0600 Cc: Pgsql-admin Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Rajesh Kumar X-Mailer: Apple Mail (2.3731.700.6) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > I am assuming like tell them "check sessions are closed properly" like = dat? Don't open until needed, close when done. Assuming they're actually a = problem--for smaller scale environments, it can be perfectly OK to have = clients holding connections open for the entire client lifetime. Set application name on connection, so that *if* there is a problem it's = easier to track down. > On Sep 26, 2023, at 8:55 AM, Jeff Janes wrote: >=20 > You haven't answered my question. If "query" is truly blank and it is = not just a permission problem, then the issue is not that they fail to = close connections after use, but rather that they open connections and = then never use them. Which could easily be a matter of some pg library being used. As far as = I see, there was also never an answer to whether this is actually a = problem and if so, how? And one more: if there is a problem, why not use pgbouncer? We've given all the information we can about how to identify such = connections. Any further help would depend on more info from Rajesh.=