--- ow <[EMAIL PROTECTED]> wrote:How? The doc only mentions db: pg_dump [option...] [dbname]
Then, how would I lock users out from the schema while it's being loaded?
Never mind how, I see there's "-n namespace" option in 7.4. But still, how would I lock users out from the schema while it's being loaded?
#!/bin/sh
( echo "start transaction;" cat $2 echo "commit transaction;" ) psql $1
then call it as
reload_in_transaction my_db my_namespace.dump
Since the whole dump will be restored inside of one transaction, nobody will see it while it's reloading.
Jan
-- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== [EMAIL PROTECTED] #
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])