From: Iain <iain@mst.co.jp>
To: pgsql-admin@postgresql.org
Cc: pgman@candle.pha.pa.us
Subject: pg_restore TODO - delay PK creation
Date: Mon, 1 Nov 2004 11:22:31 +0900
Message-ID: <017501c4bfb9$a70b7f20$7201a8c0@mst1x5r347kymb> (raw)
Hi,
I'm wondering if this is already on some todo list for pg_restore but I
didn't find any mention of it anywhere, so I thought I should post this and
see what people think..
Basically, I'd like to see an option at restore time to not include the
primary key constraint when issuing the create table command. I'd like the
PK to be added after data has been loaded using an ALTER command.
The principle reason for this is performance.
There may also be a bug somewhere, or perhaps just a problem with my system,
but I was trying to restore a fairly large table (over 7000000 rows) which
would run for a couple hours before failing. Dropping the PK enabled the
load to complete in 3 or 4 minutes. Adding the PK took another 3 or 4
minutes which adds up to quite a difference.
regards
Iain
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-admin@postgresql.org
Cc: iain@mst.co.jp, pgman@candle.pha.pa.us
Subject: Re: pg_restore TODO - delay PK creation
In-Reply-To: <017501c4bfb9$a70b7f20$7201a8c0@mst1x5r347kymb>
References: <017501c4bfb9$a70b7f20$7201a8c0@mst1x5r347kymb>
* 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