pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Ted Toth <txtoth@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: large numbers of inserts out of memory strategy
Date: Tue, 28 Nov 2017 18:22:17 +0100
Message-ID: <ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.com> (raw)
In-Reply-To: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com>
References: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com>

Hi,

On 11/28/2017 06:17 PM, Ted Toth wrote:
> I'm writing a migration utility to move data from non-rdbms data
> source to a postgres db. Currently I'm generating SQL INSERT
> statements involving 6 related tables for each 'thing'. With 100k or
> more 'things' to migrate I'm generating a lot of statements and when I
> try to import using psql postgres fails with 'out of memory' when
> running on a Linux VM with 4G of memory. If I break into smaller
> chunks say ~50K statements then thde import succeeds. I can change my
> migration utility to generate multiple files each with a limited
> number of INSERTs to get around this issue but maybe there's
> another/better way?
> 

The question is what exactly runs out of memory, and how did you modify
the configuration (particularly related to memory).

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (27+ messages)  latest in thread

Message-ID: <ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.com>
Permalink:  ../ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.com/
Also on:    postgresql.org/message-id/ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, txtoth@gmail.com
  Subject: Re: large numbers of inserts out of memory strategy
  In-Reply-To: <ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.com>
  References: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com> <ad918f32-4913-3dee-281a-5a3fee576a14@2ndquadrant.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