Re: OOM killer while pg_restore

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: OOM killer while pg_restore
Дата
Msg-id CAEudQArBWbNHkq2sEPvqHG8G9+CVcEcyDunLCAoXEAeec097fQ@mail.gmail.com
обсуждение исходный текст
Ответ на OOM killer while pg_restore  (Marc Rechté <marc4@rechte.fr>)
Ответы Re: OOM killer while pg_restore  (Marc Rechté <marc4@rechte.fr>)
Список pgsql-performance
Em qui., 3 de mar. de 2022 às 05:59, Marc Rechté <marc4@rechte.fr> escreveu:

Hello,

We have a pg_restore which fails due to RAM over-consumption of the corresponding PG backend, which ends-up with OOM killer.

The table has one PK, one index, and 3 FK constraints, active while restoring.
The dump contains over 200M rows for that table and is in custom format, which corresponds to 37 GB of total relation size in the original DB.

While importing, one can see the RSS + swap increasing linearly for the backend (executing the COPY)

On my machine (quite old PC), it failed after 16 hours, while the disk usage was reaching 26 GB and memory usage was 9.1g (RSS+swap)

If we do the same test, suppressing firstly the 5 constraints on the table, the restore takes less than 15 minutes !

This was tested on both PG 14.2 and PG 13.6 (linux 64-bit machines).

It there a memory leak or that is normal that a bacend process may exhaust the RAM to such an extent ?

Hi Marc,
Can you post the server logs?

regards,
Ranier Vilela

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

Предыдущее
От: Marc Rechté
Дата:
Сообщение: OOM killer while pg_restore
Следующее
От: Marc Rechté
Дата:
Сообщение: Re: OOM killer while pg_restore