agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Heikki Linnakangas <heikki@enterprisedb.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pg_dump restore time and Foreign Keys
Date: Thu, 05 Jun 2008 10:19:29 +0300
Message-ID: <48479381.6020006@enterprisedb.com> (raw)
In-Reply-To: <1212647003.19964.19.camel@ebony.site>
References: <1212647003.19964.19.camel@ebony.site>
Simon Riggs wrote:
> I'm guessing that the WITHOUT CHECK option would not be acceptable as an
> unprotected trap for our lazy and wicked users. :-)
Yes, that sounds scary.
Instead, I'd suggest finding ways to speed up the ALTER TABLE ADD
FOREIGN KEY. Or speeding up COPY into a table with foreign keys already
defined. For example, you might want to build an in-memory hash table of
the keys in the target table, instead of issuing a query on each INSERT,
if the target table isn't huge.
Nothing beats the speed of simply not checking the constraint, of
course, but I'd hate to lose the protection it gives.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
view thread (40+ messages) latest in thread
Message-ID: <48479381.6020006@enterprisedb.com>
Permalink: ../../48479381.6020006@enterprisedb.com/
Also on: postgresql.org/message-id/48479381.6020006@enterprisedb.com
reply
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-hackers@postgresql.org
Cc: heikki@enterprisedb.com, simon@2ndquadrant.com
Subject: Re: pg_dump restore time and Foreign Keys
In-Reply-To: <48479381.6020006@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox