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 1m6cca-0007HS-Cp for pgsql-performance@arkaria.postgresql.org; Thu, 22 Jul 2021 17:36:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m6cc2-0000kU-VP for pgsql-performance@arkaria.postgresql.org; Thu, 22 Jul 2021 17:35:58 +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 1m6cc2-0000kF-N4 for pgsql-performance@lists.postgresql.org; Thu, 22 Jul 2021 17:35:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6cbw-0001Y4-L9 for pgsql-performance@postgresql.org; Thu, 22 Jul 2021 17:35:58 +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 16MHZlr2790791; Thu, 22 Jul 2021 13:35:47 -0400 From: Tom Lane To: Peter Geoghegan cc: David Rowley , "ldh@laurent-hasson.com" , Justin Pryzby , "pgsql-performance@postgresql.org" Subject: Re: Big performance slowdown from 11.2 to 13.3 In-reply-to: References: <20210721191528.GC19620@telsasoft.com> <732758.1626911007@sss.pgh.pa.us> <784576.1626968702@sss.pgh.pa.us> <785218.1626969409@sss.pgh.pa.us> <786600.1626970898@sss.pgh.pa.us> <787780.1626972122@sss.pgh.p! a.us> <789413.1626973893@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Thu, 22 Jul 2021 10:27:43 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <790789.1626975347.1@sss.pgh.pa.us> Date: Thu, 22 Jul 2021 13:35:47 -0400 Message-ID: <790790.1626975347@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > On Thu, Jul 22, 2021 at 10:11 AM Tom Lane wrote: >> What I'm wondering about is whether it's worth putting in a solution >> for this issue in isolation, or whether we ought to embark on the >> long-ignored project of getting rid of use of "long" for any >> memory-size-related computations. There would be no chance of >> back-patching something like the latter into v13, though. > By requiring int64 be used instead of long, we don't actually increase > risk for non-Windows platforms to any significant degree. I'm pretty > sure that "long" means int64 on non-Windows 64-bit platforms anyway. Well, what we really ought to be using is size_t (a/k/a Size), at least for memory-space-related calculations. I don't have an opinion right now about what logtape.c ought to use. I do agree that avoiding "long" altogether would be a good ultimate goal. In the short term though, the question is whether we want to regard this hashagg issue as something we need a fix for in v13/v14. The fact that it's Windows-only makes it slightly less pressing in my mind, but it's still a regression that some people are going to hit. regards, tom lane