On 16/2/2024 20:18, PG Bug reporting form wrote:
> Interesting thing: after query fails it take some time (seconds) before psql
> gives control back.
> It turns out that postgresql written 1M+ (!) temporary files (most of them
> are empty) and cleaning up takes some time.
Interesting. It correlates with one performance issue I have been trying
to catch already 3 months. Could you provide some reproduction of that
behavior?
> With bigger work_mem it won't write so many files. Maybe memory issue
> somehow related with number of files.
>
> In PostgreSQL 16.2 there were fix for similar bug: [1],[2]. Could it be that
> there is some issue with it ?
Looks like surely the same issue we fixed recently: Parallel Hash Join +
DSM is a sign of that problem.
--
regards,
Andrei Lepikhov
Postgres Professional