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 1tD8ld-00GENs-9S for pgsql-admin@arkaria.postgresql.org; Mon, 18 Nov 2024 20:54:41 +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 1tD8la-007e0t-1E for pgsql-admin@arkaria.postgresql.org; Mon, 18 Nov 2024 20:54:38 +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 1tD8lZ-007e0l-M3 for pgsql-admin@lists.postgresql.org; Mon, 18 Nov 2024 20:54:38 +0000 Received: from cloud.gatewaynet.com ([185.90.37.94]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tD8lX-002a3z-L8 for pgsql-admin@lists.postgresql.org; Mon, 18 Nov 2024 20:54:37 +0000 Content-Type: multipart/alternative; boundary="------------06A10Umo1Ms4mT3pbG9IrKXS" Message-ID: Date: Mon, 18 Nov 2024 22:54:29 +0200 MIME-Version: 1.0 Subject: Re: Mysterious connections to PostgreSQL (no statement) coming from pgbouncer (mode = transaction) To: "David G. Johnston" Cc: pgsql-admin@lists.postgresql.org References: Content-Language: en-US From: Achilleas Mantzios In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------06A10Umo1Ms4mT3pbG9IrKXS Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Στις 18/11/24 22:07, ο/η David G. Johnston έγραψε: > On Mon, Nov 18, 2024 at 1:03 PM Achilleas Mantzios > wrote: > > We have been running pgbouncer (since 1.8) for quite some years, > and today I realized I have connections to the DB from pgbouncer > that don't do anything, do not execute any statement. > > > Seems reasonable that a pooler would open connections to PostgreSQL to > prime the pool even before any demand is seen.  That way demand is > immediately given a functioning connection. Hello David, I forgot to mention that in pgbouncer : min_pool_size=0 . So not reasonable. > > David J. > --------------06A10Umo1Ms4mT3pbG9IrKXS Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


Στις 18/11/24 22:07, ο/η David G. Johnston έγραψε:
On Mon, Nov 18, 2024 at 1:03 PM Achilleas Mantzios <a.mantzios@cloud.gatewaynet.com> wrote:

We have been running pgbouncer (since 1.8) for quite some years, and today I realized I have connections to the DB from pgbouncer that don't do anything, do not execute any statement.


Seems reasonable that a pooler would open connections to PostgreSQL to prime the pool even before any demand is seen.  That way demand is immediately given a functioning connection.

Hello David,

I forgot to mention that in pgbouncer : min_pool_size=0 . So not reasonable.


David J.

--------------06A10Umo1Ms4mT3pbG9IrKXS--