Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qn0tE-009hki-8Z for pgsql-bugs@arkaria.postgresql.org; Sun, 01 Oct 2023 18:10:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qn0tC-00E4iI-00 for pgsql-bugs@arkaria.postgresql.org; Sun, 01 Oct 2023 18:09:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qn0tB-00E4i4-Mo for pgsql-bugs@lists.postgresql.org; Sun, 01 Oct 2023 18:09:57 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qn0t4-007e8J-Tl for pgsql-bugs@lists.postgresql.org; Sun, 01 Oct 2023 18:09:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 391I9m6q1848412; Sun, 1 Oct 2023 14:09:48 -0400 From: Tom Lane To: Joe Conway cc: Jeff Janes , ravi.s.agrawal23@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18141: sorry, too many clients error occurring very frequently In-reply-to: References: <18141-198c521115e07b7c@postgresql.org> Comments: In-reply-to Joe Conway message dated "Sun, 01 Oct 2023 10:34:15 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1848410.1696183788.1@sss.pgh.pa.us> Date: Sun, 01 Oct 2023 14:09:48 -0400 Message-ID: <1848411.1696183788@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Joe Conway writes: > Maybe, maybe not. I have seen two other cases that are similar. One was > an upgrade from 12.8 to 12.12 and the other an upgrade from 13.4 to 13.8. > I checked and 12.8 was stamped is the same date as 13.4, and 12.12 the > same day as 13.8. > In both cases queries against pg_stat_statements suddenly started taking > more memory leading to spillage to pg_temp and a step degradation in > overall performance. In at least one of those cases the > solution/workaround was to increase work_mem. In the other I think > pg_stat_statements was disabled. > Myself and at least one other hacker looked at the pg_stat_statements > specific changes in that time interval and saw no smoking gun. > But it is possible that something else backpatched to both branches > between Aug 09, 2021 and Aug 8, 2022 has caused a more general > performance regression which we have yet to track down. Hmm. My first instinct is to wonder about changes in plan selection. How complex were the troublesome queries? regards, tom lane