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 1msdB5-0005KW-18 for pgsql-general@arkaria.postgresql.org; Thu, 02 Dec 2021 03:54:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1msdB3-00018Z-JG for pgsql-general@arkaria.postgresql.org; Thu, 02 Dec 2021 03:54:33 +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 1msdB3-00018Q-6h for pgsql-general@lists.postgresql.org; Thu, 02 Dec 2021 03:54:33 +0000 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1msdAv-0005pz-SA for pgsql-general@lists.postgresql.org; Thu, 02 Dec 2021 03:54:32 +0000 Received: by mail-il1-x12e.google.com with SMTP id i9so27688654ilu.1 for ; Wed, 01 Dec 2021 19:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=GR3x6J1RjdK75sj/buxTYVZMcUpY4Lc8UxdJYTEHKhM=; b=CZ4w+nPCsWnT2vPxyrg42P9nUb6rJLiSD/faVWDIK9Gbok3DBYhB511QBXlt6V7vwP tlZRdyds+KLWJ/Tmp+tVrLzkUVjlYUg9dHdHl5mFajI7YK7iL55PKzfkdTOU98ygdUwp DNjwM3mZ5P69gwhhulAoI5+Taxff6fnF5Gn/uHSEzs2GLggJXAFAbW0/JqbGDQrtEtBS Q+5N3hQ/jgoSpQBiq/vBCAazammnI625DqdYO7zgjO0d8FOzpmFoZulbpVUxfX+eT+lv v8DBAWlUdcc5hpUMRVfRKrZcFAGQ0ARA/OFjDQUCAgAKNgAsIbAv8Yy4052ThLV0WSxB fCVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=GR3x6J1RjdK75sj/buxTYVZMcUpY4Lc8UxdJYTEHKhM=; b=itykpdTlwjDyreN0wwG/M1GQtBN7icq6g0XJCJRHJoyD/pcMN7mcGnyenwq2nzod1h /Zl0vm8q0RcKO8KoQ2z5jBZfyJnS/BrE1NvDwGihI027frX62W+ABFO0eG9nRfMXUYT4 n6TIPkEd/x8Hq25cARAwVfomXzH4VeMFRIkqN5cDjK5bE/ztUKeWwFcTTt1JFcQvuR62 pEjkOXHKax4g4pvEIsfX+/owverBkRJC7ZOIN0Z1CbCWPtkGdQbGBk7xbUNFH4LgQm7g /COdEbil3nL0mcwtqDWK2TB5H4IhlISvK1YAVi7Tw5vyJxVZjTjOIpXm+HncATLIYXin 2C+w== X-Gm-Message-State: AOAM532FdzR2Sk/qgHeEVeFaqoXDKa8XcOS453IAo3tfZWJbYeKwFOgb 3tPVe/pNfMTCTUUcXSQtEH7ZSsblWSE= X-Google-Smtp-Source: ABdhPJz8DRu6QTXw9EiL0PwGFIrdiKQBDYIrQqBYuPKqzQ64+IbhpsD/i1tAVEhrXd8CDXdtfEzo7w== X-Received: by 2002:a92:8743:: with SMTP id d3mr7578498ilm.44.1638417263948; Wed, 01 Dec 2021 19:54:23 -0800 (PST) Received: from [10.0.0.94] (c-73-63-59-118.hsd1.ut.comcast.net. [73.63.59.118]) by smtp.gmail.com with ESMTPSA id v11sm1382042ilu.18.2021.12.01.19.54.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Dec 2021 19:54:23 -0800 (PST) Subject: Re: Max connections reached without max connections reached To: Michael Lewis Cc: pgsql-general@lists.postgresql.org References: <4176160.1637681607@sss.pgh.pa.us> <67613.1637709271@sss.pgh.pa.us> <81460.1637720668@sss.pgh.pa.us> <0fba028d-68da-349c-0996-e83f707824b7@gmail.com> From: Rob Sargent Message-ID: <5c97384a-4481-74bf-94c7-145e0c3f1d5b@gmail.com> Date: Wed, 1 Dec 2021 20:54:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------6F909009DE1BD86E8D986DB4" Content-Language: en-CA List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------6F909009DE1BD86E8D986DB4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 12/1/21 7:08 PM, Michael Lewis wrote: > On Wed, Dec 1, 2021 at 3:52 PM Rob Sargent > wrote: > > Also be on the look-out for begin trans; begin trans; etc  I read > Kumar's report as nested transactions.  If your gang is doing a > transaction per row, they need a kick in the rear.  Anyone not > closing those needs a pink slip. > > > I have seen the second attempt at calling begin seem to be ignored > with "WARNING:  there is already a transaction in progress" similar to > calling rollback without a transaction open. Are you stating or > suggesting that calling begin a second time actually is more similar > to creating a savepoint? That would be rather unexpected from the > messaging, at least for me. No.  Hard to know what the devs are up to here (what stack they're using, etc), but I'm suggesting one transaction is getting started and not closed. Warnings have been know to be ignored.  I admit I am not familiar with Kumar's term of "sub-transaction" and how those might be created but it sounds to me like a transaction is begun early in the processing and more work happens unaware of the transaction. And possible not committed. --------------6F909009DE1BD86E8D986DB4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 12/1/21 7:08 PM, Michael Lewis wrote:
On Wed, Dec 1, 2021 at 3:52 PM Rob Sargent <robjsargent@gmail.com> wrote:
Also be on the look-out for begin trans; begin trans; etc  I read Kumar's report as nested transactions.  If your gang is doing a transaction per row, they need a kick in the rear.  Anyone not closing those needs a pink slip. 

I have seen the second attempt at calling begin seem to be ignored with "WARNING:  there is already a transaction in progress" similar to calling rollback without a transaction open. Are you stating or suggesting that calling begin a second time actually is more similar to creating a savepoint? That would be rather unexpected from the messaging, at least for me.
No.  Hard to know what the devs are up to here (what stack they're using, etc), but I'm suggesting one transaction is getting started and not closed. Warnings have been know to be ignored.  I admit I am not familiar with Kumar's term of "sub-transaction" and how those might be created but it sounds to me like a transaction is begun early in the processing and more work happens unaware of the transaction.  And possible not committed.



--------------6F909009DE1BD86E8D986DB4--