pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Decibel! <decibel@decibel.org>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pg_dump restore time and Foreign Keys
Date: Mon, 09 Jun 2008 10:00:29 -0400
Message-ID: <484D377D.8050003@dunslane.net> (raw)
In-Reply-To: <E2AE91BB-0FCE-44CE-AC3B-200D6F1DD0BC@decibel.org>
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>
	<E2AE91BB-0FCE-44CE-AC3B-200D6F1DD0BC@decibel.org>



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



view thread (36+ messages)  latest in thread

Message-ID: <484D377D.8050003@dunslane.net>
Permalink:  ../484D377D.8050003@dunslane.net/
Also on:    postgresql.org/message-id/484D377D.8050003@dunslane.net

 · 

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: andrew@dunslane.net, decibel@decibel.org, simon@2ndquadrant.com, xzilla@users.sourceforge.net
  Subject: Re: pg_dump restore time and Foreign Keys
  In-Reply-To: <484D377D.8050003@dunslane.net>

* 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