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 1n81YA-0001YY-3p for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jan 2022 14:58:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n81Y8-00033q-Pe for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jan 2022 14:58:00 +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 1n81Y8-000336-FI for pgsql-hackers@lists.postgresql.org; Thu, 13 Jan 2022 14:58:00 +0000 Received: from mail-sy4aus01olkn2145.outbound.protection.outlook.com ([40.92.62.145] helo=AUS01-SY4-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n81Y6-0004cU-CI for pgsql-hackers@lists.postgresql.org; Thu, 13 Jan 2022 14:58:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eqJ+dNxXQpqaJmIwZk4HywOrwYjaT+g0qSqX24/VC7cv/Akb723+UKjfWJAovxLQ26o7bNEBLPfozo3My49tpUOdbDPBeuArbt4K+VeYIXGCTZFaYhzRjEqcSrMN/Jr3/+f5EErGjDNr2favUPX/Vll8Mz/Tm+c9ywIhDpm73EBozi+MmMk+sMJDLO88cw+S47BcBegNUbVseUsiiCBMTx8E31Xo0VGvFSkuLNjXhwtBZxChL6YZUpo51ihMFVK8/Ntr6aMftPfjbgKD7RZ1YotrlyJt/Vv51VX82Ij1XTgFVxhT+JeQgvcnIjtiaXDPH7gyG5GWWJ1Tfo44PrD0UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fSmM8oPeVIsVy8Wub5e549MMaUxaDo0ZAdOPZlEE9Gg=; b=knmaBM25mA8asJiYgrjF3VDE/rtIepwhSyGINtI7LgrQrCnYsnQ+92QUjasiDS8MyWtIWxzIrr+iFxm0T7RKv+SWsAERDOj/dK5KEn2GKx/qBtBe0+6W+/KfgbXcfkL3ZMCTjiuKwmGAFqJoUwMMc5R2RQtrxwiy2LAR0f9KPH37ugF4B1VBBkJUmd0TcFR30OyTaVVg9zZ388uD9bBrvg14U9ZvU/tjCNi0s9MUDRODeUi3BQwirLP/RAZBGC96UsOEKzJ8e9a+crC0XhhPOdHo57lYMfZwXQCeZiFEgOu6GgOR8+3PkTkyY4yRBzE1fCESSJabqAcMQ62UTim/NA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fSmM8oPeVIsVy8Wub5e549MMaUxaDo0ZAdOPZlEE9Gg=; b=njVfGINREJhupwIyDv5kpp9p0LKg3djJTfPFkjWzxmaGMrdJ4+JBSH6ACBO2JGOK4OgUdO1kyNw6uwn4+/SEakjFabuZHQ5K/Vz6EecIM4NIdUx5ETr5XjQwKoqcmUfMZMudy9hx8Xmt7FY+JEFi3Mv3R/auw6KLatB3xH0QI6jTxAy3UtYq+mVXaeqJVzQxRkUXCYPSL5ht/8CFIK0WxSrfZm+mgRGkphKdHNzM35QxjTCapt3IcqSvfBpFiFjP0gcY7Borhg56SKKZjmf4CyM4e2nVI4Sj2Pm/j+VXMnjp3bOwtBPEFfGsizim0IC4eNdmkfGNWqSS1klNrvu6QA== Received: from MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:c3::12) by ME3P282MB1601.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:ac::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Thu, 13 Jan 2022 14:57:51 +0000 Received: from MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM ([fe80::51cb:f3af:7ea5:597e]) by MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM ([fe80::51cb:f3af:7ea5:597e%3]) with mapi id 15.20.4867.012; Thu, 13 Jan 2022 14:57:51 +0000 From: Li Japin To: PostgreSQL Hackers Subject: Re: Built-in connection pooler Thread-Topic: Built-in connection pooler Thread-Index: AQHUtAhZ0oq/emmuDEaFmhbSzKf7/KXFM8cAgE/ISoCAAAB2AIChgkoAgABXnwCACgwLAIABTU8AgAhrFoCAAimUgIABEGmAgALtUACAAJldgIABAsgAgAEmbACAB+kJgIAA60QAgAIfLoCABHEZgIAAk5UAgACWogCAADVbAIAZAJsAgCG5P4CAATkXgIAEnhYAgAMgIICAFllyAIAAuUOAgAHjZgCASAOPAIAAiIMAgAIuO4CAAGGIgIDOS6uAgAAxmoCAmyNCgIABtI6AgAA1WYCAAA8QAIB4U0KAgAA7vICAAAHhAIEjYq4AgAAo/ICB0/HLAA== Date: Thu, 13 Jan 2022 14:57:50 +0000 Message-ID: References: <3edbc4d2-ebe8-d73f-a3f4-e043bc504f17@pgmasters.net> <20200917050711.GK2873@paquier.xyz> <0fd2ee44-e75b-8d14-4192-641aa07d6c89@postgrespro.ru> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3654.20.0.2.21) x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [hlj1j3smPG9NVaWr/PFxgE9U1oe8aiJN] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e8ccb179-2ad1-4aa5-5509-08d9d6a5120e x-ms-traffictypediagnostic: ME3P282MB1601:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wh/o8psMbknYZpvdAqosSnYmhlVL0tDKXkrNxWGYkgpaAdTncSi1d+XthEqeeF7c6XbiSSN95Cf1judG7tnhFguHfv/XW21kfS0ReZqKGVwqfAH6oD7pzQIJL5IbQgyqA2vhcJ0HgjDUak0MNAo9p568/Ha7rA6xHWeY3OduzsS+4V8CnHL0RFDLuBckRqbx6GOFeF9W+dYKS068XifZZfoKPCr9XGsQRde7nbF1NUA0iCMRMk3i0EUJwNS/UQ5WXk64bApY94pmweSlN4mxSIriz4c5s8lm/rxaV+JuGYHrhxxagcuhZimeoVkt1JuDbVmlI5ZLJOsVqRMsnSZr3lphyM8U34NxcPtO6EvIvfRU+j+skFpmpq5hPiQCLxijbqRQyiQPd3lZ0uTegM6m+Cg+B96TpucCasy8PbR526k/AmHy5ox9yxcBZrNJ1XSaz0YWXvnjpVSIbq3Us+jYUQ1LAOl1xeSn+FgWvVYo2aiB3Io+7gWUG3cXjoTZ0vfHr92z8MIT5xUe7lo4NuOkyRjcwUPObD/TbSKsYv3LgS2NQH0hgnr/oyVcQGLGwKJvISs7ffiLzAFc1L1MVQbbJg== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?u/zd7UVbQTfv0+71K+bx//KwSizilNKeWvxi0yUpujg4g4EzgNcZMoeD1T0A?= =?us-ascii?Q?H7z/lCcVqK4SwmVA4G+1c0eACdVvRQukLJ6ofVrVak2z9tCZ+CHN5edmoHVC?= =?us-ascii?Q?4Z0DEtzhFVqk0cQQC33s2tw2aK5HNStXXhxZu3ZD8TUD7fpsD6hgCHxqoZLB?= =?us-ascii?Q?G0gm/h2qWSg1ItiA5LGxTYBE7HyOow9NIugorac0xbJ2mYtXTpPzy03nUPyx?= =?us-ascii?Q?2XEXFfdyMgY+DdrfH2tY8GadF670a7YP9AfCtdRZgAtDo16Tx3UKatkk3C3R?= =?us-ascii?Q?KV3LT88QJxb2JKWZtd5aMPF1CZnV2Z5EVmX1YtMFVvEllrq9ORTFIcYXgsL7?= =?us-ascii?Q?252QaFwPKTPgBdlisnoixWcMu0zil1G1DIo3sqWUuoeIIq7hPRV+7MelSalE?= =?us-ascii?Q?Su3+ifAC+UbOWk5MO9ytomdTgKOttiihQmyx1s3kFo8iPQdlrNje5/yKdGn8?= =?us-ascii?Q?zqcu3aUtRIiR23GwCL7eeHwoDGmcgJEDJXJsX2av6vOhleNnJewYpt1k5gLm?= =?us-ascii?Q?OGaJ8ABfeexaj0+cbliqcqdsyfEH4Vjj3TO7XLxcEGzm59CTUnvJlNIwVjRr?= =?us-ascii?Q?QkUSlBL02FlQa9Z2d8dmAlrqVqkfLiKLEhVoALpYkrYCwzmWMcbU2mI7ug2S?= =?us-ascii?Q?MTs3DjdtELj0a2JPgAKL0OjP/tB3if3H/3sX8/ns4IaQDMrUv8UeprnEDP4a?= =?us-ascii?Q?qDOtWOyrDYpdSWLnbDhxfiYyMum3MTaRCi/2AbXXu367arjDYE0B+Q6uFGq0?= =?us-ascii?Q?j1u9N1Fgflq/TiVNFw2MoD6TENAlCPH75dAs3qx/2n5/zbvQ9oMiMXX6+2Ta?= =?us-ascii?Q?wt7lpKH2L46J5bNEaHeMtjeOKHpaAsHEB5h+HyM1ZcCb93inSlGsHY61NBr6?= =?us-ascii?Q?DWYk4IT9iXrMtlrI6uj/eT6LNw5wWH89Eyo2Fta6xX1mIXTnWSLP1ZIL27dO?= =?us-ascii?Q?LEi2DdL8lowGB29LPwH0IQ=3D=3D?= Content-Type: multipart/alternative; boundary="_000_F5F39CD946BA44029FDA29C998435BDDhotmailcom_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: e8ccb179-2ad1-4aa5-5509-08d9d6a5120e X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2022 14:57:50.9887 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME3P282MB1601 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_F5F39CD946BA44029FDA29C998435BDDhotmailcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Mar 22, 2021, at 4:59 AM, Zhihong Yu > wrote: Hi, + With load-balancing policy postmaster choose = proxy with lowest load average. + Load average of proxy is estimated by number of clients connecti= on assigned to this proxy with extra weight for SSL connections. I think 'load-balanced' may be better than 'load-balancing'. postmaster choose proxy -> postmaster chooses proxy + Load average of proxy is estimated by number of clients connecti= on assigned to this proxy with extra weight for SSL connections. I wonder if there would be a mixture of connections with and without SSL. + Terminate an idle connection pool worker after the specified numb= er of milliseconds. Should the time unit be seconds ? It seems a worker would exist for at leas= t a second. + * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group It would be better to update the year in the header. + * Use then for launching pooler worker backends and report error Not sure I understand the above sentence. Did you mean 'them' instead of 't= hen' ? Cheers On Sun, Mar 21, 2021 at 11:32 AM Konstantin Knizhnik > wrote: People asked me to resubmit built-in connection pooler patch to commitfest. Rebased version of connection pooler is attached. Hi, hackers Does the PostgreSQL core do not interested in the built-in connection pool?= If so, could somebody tell me why we do not need it? If not, how can we do for this to m= ake it in core? Thanks in advance! [Sorry if you already receive this email, since I typo an invalid pgsql lis= t email address in previous email.] -- Best regards Japin Li --_000_F5F39CD946BA44029FDA29C998435BDDhotmailcom_ Content-Type: text/html; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable

On Mar 22, 2021, at 4:59 AM, Zhihong Yu <zyu@yugabyte.com> wrote:

Hi,

+          With <literal>loa= d-balancing</literal> policy postmaster choose proxy with lowest load= average.
+          Load average of proxy is estimated by n= umber of clients connection assigned to this proxy with extra weight for SS= L connections.

I think 'load-balanced' may be better than 'load-balancing'= .
postmaster choose proxy -> postmaster chooses proxy=

+          Load average of proxy i= s estimated by number of clients connection assigned to this proxy with ext= ra weight for SSL connections.

I wonder if there would be a mixture of connections with an= d without SSL.

+         Terminate an idle connection = pool worker after the specified number of milliseconds.

Should the time unit be seconds ? It seems a worker would e= xist for at least a second.

+ * Portions Copyright (c) 1996-2018, PostgreSQL Global Dev= elopment Group

It would be better to update the year in the header.

+        * Use then for launching poole= r worker backends and report error

Not sure I understand the above sentence. Did you mean 'the= m' instead of 'then' ?

Cheers

On Sun, Mar 21, 2021 at 11:32 AM Kons= tantin Knizhnik <knizhn= ik@garret.ru> wrote:
People asked me to resubmit built-in connection pooler patch to commitfest.=
Rebased version of connection pooler is attached.


= Hi, hackers
<= br class=3D"">
D= oes the PostgreSQL core do not interested in the built-in connection pool? = If so, could
s= omebody tell me why we do not need it? If not, how can we do for this to ma= ke it in core?
<= br class=3D"">
T= hanks in advance!
<= br class=3D"">
[= Sorry if you already receive this email, since I typo an invalid pgsql list= email address in previous email.]
<= br class=3D"">
--
Best regards
Japin Li



--_000_F5F39CD946BA44029FDA29C998435BDDhotmailcom_--