Re: BUG #18909: Query creates millions of temporary files and stalls

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Sergey Koposov <Sergey(dot)Koposov(at)ed(dot)ac(dot)uk>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18909: Query creates millions of temporary files and stalls
Date: 2025-05-03 17:56:53
Message-ID: 8fc51cd7-115a-425a-828e-c99defb5afef@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 3/5/2025 18:52, Sergey Koposov wrote:
> On Sat, 2025-05-03 at 12:27 -0400, Tom Lane wrote:
>> Yeah, this confirms the idea that the hashtable has exploded into an
>> unreasonable number of buckets and batches. I don't know why a
>> parallel hash join would be more prone to do that than a non-parallel
>> one, though. I'm hoping some of the folks who worked on PHJ will
>> look at this.
> Here're my memory settings
>
> shared_buffers = 32GB
> work_mem = 1GB
May you show statistics from the pg_statistic table on two columns:
"d.objid" and "gaps1.original_ext_source_id"? At least stanullfrac,
stadistinct, stawidth and MCV frequencies.

Also, an EXPLAIN ANALYZE on this query, which successfully finished
execution without parallel workers, might provide quick insights.

--
regards, Andrei Lepikhov

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sergey Koposov 2025-05-03 19:20:59 Re: BUG #18909: Query creates millions of temporary files and stalls
Previous Message Sergey Koposov 2025-05-03 16:52:21 Re: BUG #18909: Query creates millions of temporary files and stalls