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 1l1WKY-0007Dn-GN for psycopg@arkaria.postgresql.org; Mon, 18 Jan 2021 15:20:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1WKX-00079Z-Fx for psycopg@arkaria.postgresql.org; Mon, 18 Jan 2021 15:20:33 +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 1l1WJw-0006Fp-Fq; Mon, 18 Jan 2021 15:19:56 +0000 Received: from mout.gmx.net ([212.227.15.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1WJt-0008LX-UY; Mon, 18 Jan 2021 15:19:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610983191; bh=/5cYsdakAkqVC7Hw8SIDeOBIWAhB/SX4kIKcM4VeVFs=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=VD8F2ZAw/6FjGqY4hMbAn0MZX0yJnd9FbS/TfbLRvNwfYOgPAOtQ4HEZcuy9CLqJo LX6f35J8qTJA1zi64J4KXwUIZHLcvwcgb2UdShEIjLj3AMVssbgmcPV9Wrupf3jn1W TS4fdDL2ceB/qM2HTvyJWj3lZZHqHVIzpChl3f70= 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 1MxUs7-1lyb9S1d17-00xpp2; Mon, 18 Jan 2021 16:19:51 +0100 Received: from ncq by hermes with local (Exim 4.94) (envelope-from ) id 1l1WJp-0002vi-No; Mon, 18 Jan 2021 16:19:49 +0100 Date: Mon, 18 Jan 2021 16:19:49 +0100 From: Karsten Hilbert To: psycopg@lists.postgresql.org, psycopg@postgresql.org Subject: Re: Designing a better connection pool for psycopg3 Message-ID: Mail-Followup-To: psycopg@lists.postgresql.org, psycopg@postgresql.org 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:5E8GBlt2Sih6H4lZ05OKhRPIuWPxKV559Ty6a+WF7nZXJWBTzxA 6GChagRQxCiKyzA2YBFXn3nhKSB/Qke9XCrI092jEZ3LjeCwFXyD/e/C1dATS2BWFpHiZWZ KIsUroVdvsIU+Z5fYVOUsYKXM9YQpm4MkobA9Nh3WNDHhytKxU4GRcgkknlqI3ni2wsp0BV K/j2+7rQY4Mu22UjOw+VA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:VoBwU8Emr8M=:7qmQOSxs6r2/6dX/gZw8fN 3Uysc19OI6O3ifTjuUxO3ANR2ZDImlOxDPs9DZK35oRJQ0e0HMBUmKL/yvtJMxFrIfSjPUY0T 40xLBM8kyHBJntVqSwSEH/h0SJvSD7OKwdwKsymg4Ke7UWOVtehux6k6ieS5ZOUly6ufbiIzp WR5vxDxp2rRzNhUXobD6hAk1QZuJnUmb5glLUPkIFWTCRvPg0KHW446vjU2UmMIlH7RKILhQ0 kQPGXnh4digVrycz9XnMoFR05s+aGVhIZOu4JAbuWP0k24SM+nytvcBtQgJBROKqtxgXz24fA uwoxNyCPC6chrHoqQKke2iO6RxKxc0oDakSOMi/xWg50j+OAYzB5WkYtEv8dANxv3sq7406xE cKAj3Hlm6PIW1IYOSd+ILMDfK7OIZZ7E+zdP7Uy5163mg9Bu3wljRUtGcxnzMS/2X5cICakAe CGdl1QGt4KOZ7q0a9/bRmWuwfANGHkTI4Sfbnynr4y/u/qs2aV8QjM56BmLHyaWsVJpMTu677 pjEiSTJZvumZezoUNisNOcrqnk7QN5Zvx1xNqU+X4Ej8d+5U4kqrppfzLRcwyMB36R2dNfP5+ qNFQcy1cUNbLoxxMS33TlnzMkcu40WuhLVB+Phtfc9P0Tpx/F5NYtxLpz0gjRrV7Gtl7PjmHr Ebd1fXCTJYDgjF0/+GwG77fNOoO2+JSYP8zs7F2c/+NHl9TMsPqaUaGgEAKUq8wIWD7K0DCXu RIit7rCgQgcjFTjANtFHGiLErDKXbB4z2+UphpwBlvxDOeIwX1VwSzwIcILpm3cb0DfyC/klb CnwIc2gylZrYGja7UfbxL+xBCSGvbIItGzDO1znXz9qTB6K1x+MoFD1+9z1ARPdp7ihZy8tjW NoWmf5tyOEF2GdDqYThSDWNaXSOw79/A2eYVOCCDY= 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 04:12:05PM +0100 schrieb Daniele Varrazzo: > > > partition or reconfiguration, and the app server doesn't see the > > > database anymore. This node is arguably broken. > > > > Only if this is the *only* thing it does. > > > > It might still be able to reach other services on other nodes. Other > > databases. Heck, even other database son the same node if it was a > > config error. > > In your opinion (and Karsten's, if he'd like to chip in), what should > happen on program start? Is attempting to create a new connection in > the main thread, and throwing an exception if failing to do so, a > reasonable behaviour? Sure ! The app can always catch that and decide what to do. Karsten =2D- GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B