pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <JanWieck@Yahoo.com>
To: Jan Wieck <JanWieck@Yahoo.com>
Cc: ow <oneway_111@Yahoo.com>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Programatically switching database
Date: Sat, 15 Nov 2003 21:20:56 -0500
Message-ID: <3FB6DF08.4040603@Yahoo.com> (raw)
In-Reply-To: <3FB6DE5B.1020000@Yahoo.com>
References: <20031116015008.76880.qmail@web21402.mail.yahoo.com>
	<3FB6DE5B.1020000@Yahoo.com>

Jan Wieck wrote:

> ow wrote:
> 
>> --- ow <oneway_111@yahoo.com> 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

gosh, there's the pipe missing before the psql

> 
> 
> 
> 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.                                  #
#================================================== JanWieck@Yahoo.com #




view thread (15+ messages)  latest in thread

Message-ID: <3FB6DF08.4040603@Yahoo.com>
Permalink:  ../3FB6DF08.4040603@Yahoo.com/
Also on:    postgresql.org/message-id/3FB6DF08.4040603@Yahoo.com

 · 

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-sql@postgresql.org
  Cc: JanWieck@Yahoo.com, oneway_111@Yahoo.com, peter_e@gmx.net
  Subject: Re: Programatically switching database
  In-Reply-To: <3FB6DF08.4040603@Yahoo.com>

* 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