From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aaron Brown <abrown@bzzagent.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: pg_restore failing with "ERROR: out of memory"
Date: Wed, 19 Mar 2008 15:06:39 -0400
Message-ID: <17408.1205953599@sss.pgh.pa.us> (raw)
In-Reply-To: <C406CB61.5B99%abrown@bzzagent.com>
References: <C406CB61.5B99%abrown@bzzagent.com>
Aaron Brown <abrown@bzzagent.com> writes:
> I¹m attempting to do something that should be a trivially simple task. I
> want to do a data only dump from my production data in the public schema and
> restore it on another machine.
Does it really need to be data-only? A regular schema+data dump usually
restores a lot faster.
Your immediate problem is probably that it's running out of memory for
pending foreign-key triggers. Even if it didn't run out of memory, the
ensuing one-tuple-at-a-time checks would take forever. You'd be better
off dropping the FK constraint, loading the data, and re-creating the
constraint.
There's further discussion of bulk-loading tricks in the manual:
http://www.postgresql.org/docs/8.2/static/populate.html
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, abrown@bzzagent.com
Subject: Re: pg_restore failing with "ERROR: out of memory"
In-Reply-To: <17408.1205953599@sss.pgh.pa.us>
* 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