Re: Postgresql OOM

Поиск
Список
Период
Сортировка
От Pantelis Theodosiou
Тема Re: Postgresql OOM
Дата
Msg-id CAE3TBxxfzF3GpUz_tKF=+8fe0-9+C6M8Y01nnK8FpEFLtfe2WA@mail.gmail.com
обсуждение исходный текст
Ответ на Postgresql OOM  (Radu Radutiu <rradutiu@gmail.com>)
Ответы Re: Postgresql OOM
Re: Postgresql OOM
Список pgsql-hackers


On Thu, Jun 6, 2024 at 1:25 PM Radu Radutiu <rradutiu@gmail.com> wrote:
Hello all,

I have a query that forces an out of memory error, where the OS will kill the postgresql process.
The query plan (run immediately after a vacuum analyze) is at https://explain.depesz.com/s/ITQI#html .

... 

Any idea on how to identify the problem? I can reproduce it on demand. Should I report it pgsql-bugs?

Best regards,
Radu

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.

  FROM inputrequest t  LEFT JOIN outputrequest rec_tro      ON rec_tro.input_sequence = t.input_sequence  LEFT JOIN inputrequest r      ON r.originalRequest_id = t.input_sequence  LEFT JOIN outputrequest rpl_rec_tro      ON rpl_rec_tro.input_sequence = r.input_sequence  LEFT JOIN outputrequest rpl_snd_tro      ON rpl_snd_tro.reply_input_sequence = r.input_sequence  LEFT JOIN outputrequest snd_tro      ON snd_tro.reply_input_sequence = t.input_sequence  

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Julien Tachoires
Дата:
Сообщение: Re: Compress ReorderBuffer spill files using LZ4
Следующее
От: Bertrand Drouvot
Дата:
Сообщение: Re: How about using dirty snapshots to locate dependent objects?