Re: Out of memory error on pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nik" <XLPizza(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Out of memory error on pg_restore
Date: 2006-03-08 20:54:11
Message-ID: 17668.1141851251@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Nik" <XLPizza(at)gmail(dot)com> writes:
> pg_restore: ERROR: out of memory
> DETAIL: Failed on request of size 32.
> CONTEXT: COPY lane_data, line 17345022: "<line of data goes here>"

A COPY command by itself shouldn't eat memory. I'm wondering if the
table being copied into has any AFTER triggers on it (eg for foreign key
checks), as each pending trigger event uses memory and so a copy of a
lot of rows could run out.

pg_dump scripts ordinarily load data before creating triggers or foreign
keys in order to avoid this problem. Perhaps you were trying a
data-only restore? If so, best answer is "don't do that". A plain
combined schema+data dump should work.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Poul Møller Hansen 2006-03-08 21:05:35 Re: pg_dump error - filesystem full
Previous Message Tom Lane 2006-03-08 20:49:28 Re: 8.0 Client can't connect to 7.3 server?