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 1okPMc-0004Xa-6m for psycopg@arkaria.postgresql.org; Mon, 17 Oct 2022 12:37: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 1okPMb-0004b1-3d for psycopg@arkaria.postgresql.org; Mon, 17 Oct 2022 12:37:01 +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 1okPMa-0004as-TT for psycopg@lists.postgresql.org; Mon, 17 Oct 2022 12:37:00 +0000 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1okPMY-0000Qy-6r for psycopg@postgresql.org; Mon, 17 Oct 2022 12:37:00 +0000 Received: by mail-qv1-xf31.google.com with SMTP id y10so7277550qvo.11 for ; Mon, 17 Oct 2022 05:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nE4gJNOjDAhy4zTNoVeTBTKAZKAaqzC+NYtKQJQA4gQ=; b=naIupS7FEFTtNzwL176gYxbVoosGT4PFayTDEeSjZJiXq+gIEOd0hDO0ph2RrHOj2b XBhm0hFXYX2jJn5gAR3+FMKdnRDbueajmNZeOq+dCvsiUTkb51JPgMpKyFG+INmImnyU nV5d+4R70fIjyQ9A4bXp5aAeBZZ0oma8T8AIIk/0dWP9Ho7wU8aQOyCLe++GVkLN7XCL Y+yskfdIfWS5PWNYwToYzQWr9XptZik/gmcu4+Q7bMnxHixNoMMm9keQTAtjcZCCcyVv AuOOt0gOKxm8MAt4XAv3FkZXyneK2QJGeisCIEUuVL8GtibK6BJQ9ngA90Pt+gOSCdXJ +oBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nE4gJNOjDAhy4zTNoVeTBTKAZKAaqzC+NYtKQJQA4gQ=; b=jQMw3vIuTJwhAmHpSnamK/dxerNuVc2znsmwoh7zBwvMCvB3Lstdq7VR4oZvCd2aGe +0lI/VKbsl3V/T8uH+9wbiSu7M0idbq1r99K8KdL06p6cPjQjrM/fqoTcT5hYCP0LtvI J8D7rGyOb+2ynFIHthYIV/HAouXtVB4YZ6HSw70eCLg2hS7P8vbpHHnpiYT75qyeZQRQ zm+jg2m66yy6htDTj9Urj170Ybu/t03xW67zne2YX0BdGGZxWC3Tgbj5k21fuNCLBhvy FRRLbYcumyHLmaYeolw3aMYFnF6hxAX+TsNxqJZ0FlsYKTpKyuPQBu8gI2+Ui0i4qnSZ dtEg== X-Gm-Message-State: ACrzQf30YtmkhyIV0n6NH1yiRcU2K59jlMz9z6DtaxPR14gopOb11qbO 0ChSLH7bEMDQce7xjA4IIO0gvHN9h2tjrH4J2hs= X-Google-Smtp-Source: AMsMyM7jhJZPoMtI50/G5ReaVIaN2v6lmxCWjFU6gRC+ve383ycnqZa21y/YpV/Mhud9Rhng71sT4fb0+yODe0nLLqk= X-Received: by 2002:a05:6214:f65:b0:4b3:f4f2:fcaa with SMTP id iy5-20020a0562140f6500b004b3f4f2fcaamr7979427qvb.48.1666010216384; Mon, 17 Oct 2022 05:36:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daniele Varrazzo Date: Mon, 17 Oct 2022 13:36:45 +0100 Message-ID: Subject: Re: Puzzling situation with threads and psycopg2 on RDS To: Stefan Knecht Cc: psycopg@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 17 Oct 2022 at 13:08, Stefan Knecht wrote: >> Which version of psycopg are you >> using? Some old one have problems with closing connections in >> multiprocess environments. That was fixed in psycopg 2.8 (#829). >> > > This is psycopg 3.1.3 > > And I just realized that all the other threading code I've got is on psycopg2-binary 2.8. Has there something changed with threads in v3 ? Ok, you mentioned psycopg2 in the title, so I thought about that past issue we found. Psycopg 3 shouldn't have a massively different behaviour (and is tested for issue #829). -- Daniele