pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Marc Rechté <marc4@rechte.fr>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: OOM killer while pg_restore
Date: Thu, 3 Mar 2022 08:46:13 -0600
Message-ID: <20220303144613.GF27651@telsasoft.com> (raw)
In-Reply-To: <866ba95f-86fb-fa9b-ecee-65281160cff9@rechte.fr>
References: <866ba95f-86fb-fa9b-ecee-65281160cff9@rechte.fr>

On Thu, Mar 03, 2022 at 09:59:03AM +0100, Marc Rechté wrote:
> 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.

Send the schema for the table, index, and constraints (\d in psql).

What are the server settings ?
https://wiki.postgresql.org/wiki/Server_Configuration

What OS/version ?

> 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)





view thread (10+ messages)  latest in thread

Message-ID: <20220303144613.GF27651@telsasoft.com>
Permalink:  ../20220303144613.GF27651@telsasoft.com/
Also on:    postgresql.org/message-id/20220303144613.GF27651@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, marc4@rechte.fr, pgsql-performance@lists.postgresql.org
  Subject: Re: OOM killer while pg_restore
  In-Reply-To: <20220303144613.GF27651@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox