Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK3Pv-0000Rx-TG for pgsql-general@arkaria.postgresql.org; Thu, 02 Apr 2020 17:14:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jK3Pt-0002Yr-OL for pgsql-general@arkaria.postgresql.org; Thu, 02 Apr 2020 17:14:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK3Pt-0002VW-G3 for pgsql-general@lists.postgresql.org; Thu, 02 Apr 2020 17:14:09 +0000 Received: from mx-us-phx-03.bmc.com ([198.147.194.158] helo=mx-us-phx-03-int.bmc.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK3Pm-000512-Ad for pgsql-general@postgresql.org; Thu, 02 Apr 2020 17:14:08 +0000 Received: from pps.filterd (mx-us-phx-03-int.bmc.com [127.0.0.1]) by mx-us-phx-03-int.bmc.com (8.16.0.27/8.16.0.27) with SMTP id 032GvDd9032554; Thu, 2 Apr 2020 17:14:00 GMT Received: from phx-exmbprd-01.adprod.bmc.com ([172.24.35.196]) by mx-us-phx-03-int.bmc.com with ESMTP id 304jsyx2g1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Apr 2020 17:14:00 +0000 Received: from PHX-EXMBPRD-01.adprod.bmc.com (172.24.35.196) by phx-exmbprd-01.adprod.bmc.com (172.24.35.196) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Apr 2020 12:13:58 -0500 Received: from PHX-EXMBPRD-01.adprod.bmc.com ([172.24.31.226]) by phx-exmbprd-01.adprod.bmc.com ([172.24.31.226]) with mapi id 15.00.1497.000; Thu, 2 Apr 2020 12:13:58 -0500 From: "Abraham, Danny" To: Tom Lane CC: "pgsql-general@postgresql.org" Thread-Topic: [EXTERNAL] Re: too many clients already Thread-Index: AdYJACbU3d7j1EwfS6Gf573iXWACkgADUISiAAEdkBA= Date: Thu, 2 Apr 2020 17:13:58 +0000 Message-ID: <1b2dd9f85ea945dd80d3ceb194115612@phx-exmbprd-01.adprod.bmc.com> References: <17877.1585842715@sss.pgh.pa.us> <92f708a939754943bb4e75b47d1a10ba@phx-exmbprd-01.adprod.bmc.com> <20255.1585845622@sss.pgh.pa.us> In-Reply-To: <20255.1585845622@sss.pgh.pa.us> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [192.168.6.253] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: RE: Re: too many clients already X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-02_07:2020-04-02,2020-04-02 signatures=0 X-Proofpoint-Spam-Reason: safe List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Agree. I suspect that this is a mal configured pgpool - the developer thinks that = the pool is reusing connections, While it is, in fact, reopening them. -----Original Message----- From: Tom Lane =20 Sent: Thursday, April 02, 2020 7:40 PM To: Abraham, Danny Cc: pgsql-general@postgresql.org Subject: [EXTERNAL] Re: too many clients already "Abraham, Danny" writes: > Well, I guess the questions is - how do I optimize PG for a stream of ver= y short life checks... You should be using a connection pooler for a load like that. PG backends are fairly heavyweight things --- you don't want to fire one up= for just a single query, at least not when there are many such queries per= second. I think pgbouncer and pgpool are the most widely used options, but this is = a bit outside my expertise. regards, tom lane