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 1uAyd5-004oKh-1X for pgsql-bugs@arkaria.postgresql.org; Fri, 02 May 2025 22:13:11 +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 1uAyd3-00Byir-19 for pgsql-bugs@arkaria.postgresql.org; Fri, 02 May 2025 22:13:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uAyd2-00Byij-PL for pgsql-bugs@lists.postgresql.org; Fri, 02 May 2025 22:13:09 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uAyd1-000lty-2F for pgsql-bugs@lists.postgresql.org; Fri, 02 May 2025 22:13:09 +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 542MCwv62051618; Fri, 2 May 2025 18:12:58 -0400 From: Tom Lane To: skoposov@ed.ac.uk cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18909: Query creates millions of temporary files and stalls In-reply-to: <18909-e5e1b702c9441b8a@postgresql.org> References: <18909-e5e1b702c9441b8a@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 02 May 2025 18:45:48 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2051616.1746223978.1@sss.pgh.pa.us> Date: Fri, 02 May 2025 18:12:58 -0400 Message-ID: <2051617.1746223978@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > I have a query: ... > that I ran (from python client), and after it didn't finish in ~ an hour, i > started to investigate, finding that the pgsql_tmp folder had 15 million > temporary files from that query. Does it behave any better if you disable parallelism (set max_parallel_workers_per_gather = 0) ? regards, tom lane