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 1l1VlJ-0005q8-V8 for psycopg@arkaria.postgresql.org; Mon, 18 Jan 2021 14:44:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1VlI-0000OX-Ts for psycopg@arkaria.postgresql.org; Mon, 18 Jan 2021 14:44:08 +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 1l1VlI-0000O4-Mg for psycopg@lists.postgresql.org; Mon, 18 Jan 2021 14:44:08 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l1VlG-0002nc-NY for psycopg@postgresql.org; Mon, 18 Jan 2021 14:44:08 +0000 Received: by mail-lj1-x22f.google.com with SMTP id n11so18478584lji.5 for ; Mon, 18 Jan 2021 06:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hTv2/lyFO+y8n2UUXoGJx/xLO+0ir+9w7/G/llPYH5w=; b=uaF7bxH2f5m25pZl2aqRr7Y9ZPQGoP5A/QNxDUJjgdl9pOOBWEXnFhi4L2QGx0KyF0 nRR0OMw2/DhpALVH0rvc2unZaK3G3/xbcqDsgENBKdXhTLD0TWpUOHjXjiqxHWitmrxo yQ4sHDTwm/DdC5QdbXV0TI8qHTGsusOMjGg/4w90jn/jalMRLuEU0ce9X7xu6WC2czQI jNjoMHxOrZFIJTBiyhzRRJB+3pYFMEmXv1TavOujvioGTaxjA8JOwZp3YIME2lVgjHwN t3R7sFUZsS2Bzb+YBZeIDlonKB5mDEFF3Rbzf4JZNnWLdCdcKZ68P7WvxE8Ib6gXvHQI xAow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hTv2/lyFO+y8n2UUXoGJx/xLO+0ir+9w7/G/llPYH5w=; b=GYC+D7ryj3M+L5dJeLKHPaGYf4qR/1UXMpCQ/1tI6HxDhrYWQTL8eeaSRfBdNBCBhC PuzUN55xMTBUPMCrTjPNwkaihGfkEnzXPBXtJMJHJdYjhTVsq/EkQaH4NWJ8qRHTWmmT 1I0mXnb/DhCzvu8F7wOljDoRpnfnpNhfX8WE52VToFr4nnev0J5RTTH0z6H6PIFFBMqH L5hFoGwfpQW0CLGOf8PtYn8vmy8TSZOXloSxwHqIubr/9+H+wabNJG5FeX+IVkR4Yjo7 UhNiJInwIHuRWSN3+8UNzCBtjCWpfJxSh1d0tLd18AqCRHBtvG3J+pavrq/FTKzCCFKr mWRw== X-Gm-Message-State: AOAM5327luDJnJjE7q1P2Ojj7Ti+ZcRsX5ivYK6dW9zjN7QPn6yd8EAd fDMFQ1c5vT0Kcxi59h3oxwnJdfIGk9MLiy8TiOBHZ+yN X-Google-Smtp-Source: ABdhPJyGxWvQOKvUnxELGXZEfilIjmqIgWkYQklobSWnmBOSohRc23LeD8MFMrb/176AK6tVmMUeZOepP3qLDBf4/9I= X-Received: by 2002:a05:651c:204e:: with SMTP id t14mr2182ljo.499.1610981045731; Mon, 18 Jan 2021 06:44:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Daniele Varrazzo Date: Mon, 18 Jan 2021 15:43:54 +0100 Message-ID: Subject: Re: Designing a better connection pool for psycopg3 To: Magnus Hagander Cc: psycopg@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 18 Jan 2021 at 15:39, Magnus Hagander wrote: > And if you want to avoid the "timeout based error" in the client, > adding a flag to the pool saying "this pool is currently unhealthy" in > this case would work, and then whenever someone tries to get a > connection out of this pool it can throw an exception immediately > instead of waiting for a timeout to happen. This is a good idea, thank you :) -- Daniele