Re: OOM in hash join - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: OOM in hash join
Date
Msg-id CAEze2Wi1F3GuPapyXe54k29JqzbzQ5Mc3mng=nFSOYyonQ+NTw@mail.gmail.com
Whole thread Raw
In response to OOM in hash join  (Konstantin Knizhnik <knizhnik@garret.ru>)
Responses Re: OOM in hash join
List pgsql-hackers
On Fri, 14 Apr 2023 at 12:59, Konstantin Knizhnik <knizhnik@garret.ru> wrote:
>
> Hi hackers,
>
> Too small value of work_mem cause memory overflow in parallel hash join
> because of too much number batches.
> There is the plan:

[...]

> There is still some gap between size reported by memory context sump and
> actual size of backend.
> But is seems to be obvious, that trying to fit in work_mem
> sharedtuplestore creates so much batches, that  them consume much more
> memory than work_mem.

The same issue [0] was reported a few weeks ago, with the same
diagnosis here [1]. I think it's being worked on over there.

Kind regards,

Matthias van de Meent

[0] https://www.postgresql.org/message-id/flat/20230228190643.1e368315%40karst
[1]
https://www.postgresql.org/message-id/flat/3013398b-316c-638f-2a73-3783e8e2ef02%40enterprisedb.com#ceb9e14383122ade8b949b7479c6f7e2



pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: OOM in hash join
Next
From: Thomas Munro
Date:
Subject: Re: OOM in hash join