Re: pg_restore: error returned by PQputline - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_restore: error returned by PQputline
Date
Msg-id 1815.1094167897@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore: error returned by PQputline  (Clodoaldo Pinto Neto <clodoaldo_pinto@yahoo.com.br>)
List pgsql-general
=?iso-8859-1?q?Clodoaldo=20Pinto=20Neto?= <clodoaldo_pinto@yahoo.com.br> writes:
>> --- Tom Lane <tgl@sss.pgh.pa.us> escreveu:
>>> Googling for "OOM kill" will give you additional gory details :-(.
>>
> I did:
> # /sbin/sysctl -w vm.overcommit_memory=2
> vm.overcommit_memory = 2

> But it didn't help much:

> DeferredTriggerXact: 1414520832 total in 179 blocks; 3016 free (10
> chunks); 1414517816 used

Well, at least now we can see *why* you have an issue: the
pending-trigger list is getting too big.

What you probably need to do is disable user triggers and/or drop
foreign key constraints while you load the data, then reinstall
these things.

The normal pg_restore sequence is designed to avoid this problem
by doing things in the "right" order.  However, if you restore
schema and data separately then you can easily run into this problem.

            regards, tom lane

pgsql-general by date:

Previous
From: Clodoaldo Pinto Neto
Date:
Subject: Re: pg_restore: error returned by PQputline
Next
From: Paul Tillotson
Date:
Subject: postgres "on in the internet"