Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D0C032E00D4 for ; Mon, 9 Jun 2008 11:17:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 38375-01-9 for ; Mon, 9 Jun 2008 11:17:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from alexis.jtlnet.com (alexis.jtlnet.com [69.36.9.81]) by developer.postgresql.org (Postfix) with ESMTP id A60AB2E026B for ; Mon, 9 Jun 2008 11:00:59 -0300 (ADT) Received: from [192.168.10.103] (cpe-075-177-177-228.nc.res.rr.com [::ffff:75.177.177.228]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by alexis.jtlnet.com with esmtp; Mon, 09 Jun 2008 09:59:36 -0400 id 0007FD6D.484D3748.00001222 Message-ID: <484D377D.8050003@dunslane.net> Date: Mon, 09 Jun 2008 10:00:29 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.0.9-3.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: "Decibel!" CC: Simon Riggs , Robert Treat , pgsql-hackers@postgresql.org Subject: Re: pg_dump restore time and Foreign Keys References: <1212647003.19964.19.camel@ebony.site> <4847D4A7.70309@dunslane.net> <1212670595.19964.55.camel@ebony.site> <200806071308.00845.xzilla@users.sourceforge.net> <1212860515.12046.78.camel@ebony.site> <484ADAD4.2080701@dunslane.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/386 X-Sequence-Number: 119499 Decibel! wrote: > > > 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... I had some thoughts along the same lines. But how do you propose to recover when the check fails? What should pg_restore do if the dump is corrupt causing an FK check to fail? I suppose we could have some sort of marking for FK constraints along the lines of {checked, unchecked, invalid}. > > 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? We are the database that tries very hard to keep its promises. If you want to change or relax those promises then the implications need to be very very clear. > 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. > Come up with a good proposal and I'm your man :-) I haven't seen one yet. cheers andrew