Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering) - Mailing list pgsql-general

From Ken Tanzer
Subject Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)
Date
Msg-id CAD3a31Xqa2jo8Ly_5mfL8Qowg9gD1wHnSkhfZUYEVb0vYiE=Kw@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Help with restoring a dump in Tar format?(dependencies/ordering)  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)
Re: [GENERAL] Help with restoring a dump in Tar format?(dependencies/ordering)
List pgsql-general
I can't really make this an FK.  I can (and probably will) put this into a trigger.  Although it seems like an extra layer of wrapping just to call a function.  I'm curious if there's any conceptual reason why constraints couldn't (as an option) be restored after all the data is loaded, and whether there would be any negative consequences of that?  I could see if your data still didn't pass the CHECKs, it's already loaded.  But the constraint could then be marked not valid?

Not sure why just know that if I stay within the guidelines it works, if I do not its does not work:)


That's fair enough, leaving aside the curiosity part.  Usually though the things you can't do just aren't allowed.  It's easier to overlook something that you shouldn't (but can) do!

 
See that, but in your scenario you wanted to create a 'scratch' database so you are back to a user with privileges. 


Yeah, I was thinking pg_dump could just conjure it up in the ether (and then discard it), but I can see that doesn't really work.


Basically, if you have no way to test your backup/restore procedure before hand you are flying blind.


In this case, we had tested the restore part.  But then we changed the DB in a way that made it stop working.  Good reminder to retest that periodically!

Ken




--
AGENCY Software  
A Free Software data system
By and for non-profits
(253) 245-3801

learn more about AGENCY or
follow the discussion.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Help with restoring a dump in Tar format?(dependencies/ordering)
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] Help with restoring a dump in Tar format? (dependencies/ordering)