pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: Sergey Koposov <Sergey.Koposov@ed.ac.uk>
To: tgl@sss.pgh.pa.us <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #18909: Query creates millions of temporary files and stalls
Date: Sat, 3 May 2025 19:56:53 +0200
Message-ID: <8fc51cd7-115a-425a-828e-c99defb5afef@gmail.com> (raw)
In-Reply-To: <80bab58be182e80e73b5d5f71664ede9ce58f957.camel@ed.ac.uk>
References: <18909-e5e1b702c9441b8a@postgresql.org>
	<2051617.1746223978@sss.pgh.pa.us>
	<beb051161520fc48248c2f90582eb15c6a71d239.camel@ed.ac.uk>
	<5e98fba645682c40bf5f88ef858963ade9681956.camel@ed.ac.uk>
	<2177960.1746289626@sss.pgh.pa.us>
	<80bab58be182e80e73b5d5f71664ede9ce58f957.camel@ed.ac.uk>

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





view thread (17+ messages)  latest in thread

Message-ID: <8fc51cd7-115a-425a-828e-c99defb5afef@gmail.com>
Permalink:  ../8fc51cd7-115a-425a-828e-c99defb5afef@gmail.com/
Also on:    postgresql.org/message-id/8fc51cd7-115a-425a-828e-c99defb5afef@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: lepihov@gmail.com, Sergey.Koposov@ed.ac.uk, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18909: Query creates millions of temporary files and stalls
  In-Reply-To: <8fc51cd7-115a-425a-828e-c99defb5afef@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox