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 1l1VK7-0004mY-IT for psycopg@arkaria.postgresql.org; Mon, 18 Jan 2021 14:16:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1VK6-0006vO-BI for psycopg@arkaria.postgresql.org; Mon, 18 Jan 2021 14:16:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1VK6-0006vH-3q for psycopg@lists.postgresql.org; Mon, 18 Jan 2021 14:16:02 +0000 Received: from mout.gmx.net ([212.227.15.15]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1VK3-0007ri-Ej for psycopg@lists.postgresql.org; Mon, 18 Jan 2021 14:16:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610979356; bh=l/E3BMGdC3MtG89QCOloyg+2mVaiLMePZThG4exBcR0=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=XkI5JV5az90R2Yn9KjNaexjWDY7Pkx0ZQgMVBxfVZ23RJ3OB75cNESPw6V1ymdBIK TRVYny4zegxIUytfPLuJUNQ++oAZbypitLdAm7rXjMGho/Hl4p6jww33AkWnnnK3dF AQvyFOtpe4OiZXGFE6qXKcy3DHFPskWJE6EWLLIw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermes ([89.12.167.206]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M2f9h-1l2sUt1nLz-004BI9; Mon, 18 Jan 2021 15:15:56 +0100 Received: from ncq by hermes with local (Exim 4.94) (envelope-from ) id 1l1VJz-0001Zt-LC; Mon, 18 Jan 2021 15:15:55 +0100 Date: Mon, 18 Jan 2021 15:15:55 +0100 From: Karsten Hilbert To: psycopg@lists.postgresql.org Cc: Daniele Varrazzo Subject: Re: Designing a better connection pool for psycopg3 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Ma_X_il-Followup-to: d Re_X_turn-receipt-to: Karsten.Hilbert@gmx.net Di_X_sposition-Notification-To: Karsten.Hilbert@gmx.net X-Confi_X_rm-Reading-To: Karsten.Hilbert@gmx.net X-Pri_X_ority: 2 (High) Sender: X-Provags-ID: V03:K1:hDyPlczwe1PXfL/q3SBYkLQeq+S+UnEzI/J3TBFu6APF4pyIUih s5nPEO+vlaesNvxoF/luI7zZU78314XEuK4tpF0yJVFFjatBZFDvoxra0NBekGe0w2bSxsY l3uQCEOfwOrABBP0QX+52TBJ3J6i28n3rdcr1+QNXmKOKmSIAqyuaR4ogTfCv0I4swlTM5D q4tbhIU5SEPyjyqjJ9doQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:n3UITq/hONI=:qCwv/NuH1UigzTncp5HbHK k2lQVXlAXgnkHI+07sn4jUDvWaROqfIMOdzWNQxE63Zxj5tu1Ce2SLtCn8f5FUzbn85kCpAkY WJ+yAEaA2E/CyMWhuO3rXTPX1kE3S2Vqomh4Rg267YgzBkj+1O6AqsW/YhsqrNokPYXtPBohI tl0pD2JXpsQXGmtq7QNqsHtvpx7Yk3Uta7U0rSYDKGm0a2LowB3Wh/P4M4Tg5HqINxvS4c8mn HBTiid3jQ3Lyz/s/wX2WelPjTZ6bhi5meBMFTW9Mx61gwoqLjRJAmFnoi5C4lGjdujbatWQxG 3Rk97uLR5dG2OK8g35ckBTx3DS0n86Vp6BJkROrSSBIQKT23+i1Z8+/JGGqIbgMn5gsQTWLQq o2ZFLXYTeB9JD6Mxja5U/axKLZ2/tvJM5i8svWLnoAA7rxFtV+ayVJls8+0deLiCOumojcjN1 l7ZR9caHNerKi166ZDNLTi+3AXsvd7aBQ3Z3nPQlG/qYMmuA0DX/8kgQ7aPdC8n6X6f81WsTH eGa9Rt0T0+peE5na9Wf1g3iXl2C4+Ag4nPW85whA0jI7+wLtgiQAiibf61XERo2wRb9IuiteF /xPXPTSsi0bgslC8QxUFyX1F7WCPXqhMwZENizkOXf+d8E+wXO4+ZzoXU52/bgJKVc/aXqDmZ 4XsTisvWJAN2b9QKCLUf3yn+uQFS2c1TCMKMMXa0QjXinh/j16e7fhAc7e0YP8/p+87HbSHKV LhPZ6vtfAxPGiF5MHB6PRgw5Yhf5nQt6HKKKqx/oKRzLZRMqCGTs14YQdsO77vsM/njLPWHpV L9FiC9+9lFlWwnc0/60uw/9xUN/87Z/eNv8vgtI3dqpLyCEFnjXV1/C7OBQQQ7Z5fWRu+8jeS /vg9ySbB2ccf4FsoZETg== Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Am Mon, Jan 18, 2021 at 02:13:21PM +0100 schrieb Karsten Hilbert: > > https://www.psycopg.org/articles/2021/01/17/pool-design/ > > I would strongly advise against making sys.exit() the default > for pool.terminate() unless I misunderstand something. IMO it should fall back to stopping the pooling machinery and trying to return new connections on request. Karsten =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B