Out of memory error on pg_restore

From: "Nik" <XLPizza(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Out of memory error on pg_restore
Date: 2006-03-08 15:31:19
Message-ID: 1141831879.940954.155220@z34g2000cwc.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am running PostgreSQL 8.1.3 on Windows 2003 Server.

I am trying to transfer the data from a table in db1on one machine to a
table in db2 on a different machine. The table size is about 22Gb
(about 280 million rows).

I was trying to do it by generating a backup file of the table in db1
and restoring it to db2. First, I created a plain 22Gb SQL dump and
tried inserting it via psql. After some time it failed with the
following error:

psql: ERROR: out of memory
DETAIL: Failed on request of size 32.

I tried creating a compressed backup file (about 800Mb) and restoring
it using pg_restore but I got the following error:

pg_restore: ERROR: out of memory
DETAIL: Failed on request of size 32.
CONTEXT: COPY lane_data, line 17345022: "<line of data goes here>"
pg_restore: [archiver (db)] error returned by PQendcopy
pg_restore: *** aborted because of error

So it seems like I am getting the same error in both cases.

What is the cause? How could I adjust the restoring process or database
parameters to handle this transfer? Is there a better way to transfer
this data?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-03-08 15:34:56 Re: regarding contains operator
Previous Message Michael Glaesemann 2006-03-08 15:02:04 Re: database/schema level triggers?