Re: pg_dump restore time and Foreign Keys

From: Decibel! <decibel(at)decibel(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_dump restore time and Foreign Keys
Date: 2008-06-09 12:43:26
Message-ID: E2AE91BB-0FCE-44CE-AC3B-200D6F1DD0BC@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jun 7, 2008, at 2:00 PM, Andrew Dunstan wrote:
> If we go down this road then I would far rather we tried to devise
> some safe (or semi-safe) way of doing it instead of simply
> providing expert (a.k.a. footgun) mode.
>
> For instance, I'm wondering if we could do something with checksums
> of the input lines or something else that would make this difficult
> to do in circumstances other than pg_restore.

Yes, but that provides no help at all outside of pg_dump. Being able
to add a FK with NO CHECK would be tremendously useful outside of
pg_dump. Actually, in the interest of stating the problem and not the
solution, what we need is a way to add FKs that doesn't lock
everything up to perform the key checks. Perhaps there is some semi-
safe way that the constraint could be added and the checks done in
the background...

As for the footgun aspect, are we the enterprise-class OSS database
or the one that caters itself to noobs that will go out of their way
to make life hard on themselves? I'm all in favor of not adding
footguns that don't have value, but this one holds a lot of value for
anyone trying to maintain a large database in a 24/7 environment. To
put this in perspective, the amount of revenue we would loose from
adding just one FK to one of our larger tables would more than cover
paying someone to develop this feature.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Decibel! 2008-06-09 12:55:08 Re: proposal: add window function to 8.4
Previous Message Magnus Hagander 2008-06-09 12:37:52 Re: TODO, FAQs to Wiki?