From: | Radu Radutiu <rradutiu(at)gmail(dot)com> |
---|---|
To: | Pantelis Theodosiou <ypercube(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Postgresql OOM |
Date: | 2024-06-06 14:19:34 |
Message-ID: | CAG4TxrgMjyjc5k=cJin-+tK-7Ua0MZVGQryOQoBRcfBPUnoMkw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
>
>> I am not qualified to answer on the OOM issue but why are you joining the
> same table (outputrequest) 4 times (using an identical join condition)?
> This essentially does a cross join, if an input_sequence value has say,
> 1000 related rows in outputrequest, you will be getting 1000^4 rows in the
> result set.
>
The query itself runs fine in a reasonable time with enable_parallel_hash =
'off'. I see two problems - one is the wrong execution plan (right after
running analyze), the second and the most important is the huge memory
usage (far exceeding work_mem and shared buffers) leading to OOM.
See https://explain.depesz.com/s/yAqS for the explain plan
with enable_parallel_hash = 'off.
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Sharma | 2024-06-06 14:21:22 | Re: How about using dirty snapshots to locate dependent objects? |
Previous Message | Ashutosh Sharma | 2024-06-06 14:09:31 | Re: How about using dirty snapshots to locate dependent objects? |