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 1niMpk-0000NB-2C for pgsql-general@arkaria.postgresql.org; Sat, 23 Apr 2022 20:58:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1niMpi-0007VP-J1 for pgsql-general@arkaria.postgresql.org; Sat, 23 Apr 2022 20:58:22 +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 1niMpi-0007VF-8C for pgsql-general@lists.postgresql.org; Sat, 23 Apr 2022 20:58:22 +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 1niMpf-00063l-7f for pgsql-general@lists.postgresql.org; Sat, 23 Apr 2022 20:58:21 +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 23NKvmRV3987447; Sat, 23 Apr 2022 16:57:48 -0400 From: Tom Lane To: "David G. Johnston" cc: Peter , "pgsql-generallists.postgresql.org" Subject: Re: SELECT creates millions of temp files in a single directory In-reply-to: References: Comments: In-reply-to "David G. Johnston" message dated "Sat, 23 Apr 2022 13:15:21 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3987445.1650747468.1@sss.pgh.pa.us> Date: Sat, 23 Apr 2022 16:57:48 -0400 Message-ID: <3987446.1650747468@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > v12 what? That ... > It would help if you can provide a self-contained demonstration > that others can then verify and debug (or explain). ... and that. As this message stands, it's undocumented whining. Please see https://wiki.postgresql.org/wiki/Slow_Query_Questions for the sort of information we need to debug performance issues. There's also https://wiki.postgresql.org/wiki/Guide_to_reporting_problems although that's not oriented specifically to performance issues. (I recall that we have fixed some problems in the past that could lead to unreasonable numbers of temp files in hash joins. Whether there's more to do, or Peter is running a version that lacks those fixes, is impossible to tell with the given info.) regards, tom lane