Re: Programatically switching database - Mailing list pgsql-sql

From ow
Subject Re: Programatically switching database
Date
Msg-id 20031116051842.57962.qmail@web21404.mail.yahoo.com
Whole thread Raw
In response to Re: Programatically switching database  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: Programatically switching database
Re: Programatically switching database
COPY
List pgsql-sql
--- Jan Wieck <JanWieck@yahoo.com> wrote:
> #!/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.

Interesting idea. I know some RDBMSs that are very picky about DDL in
transactions but it appears pgSql handles it without any problems.

My concern though ... wouldn't pgSql server collapse when faced with
transaction spawning across 100M+ records? And how would that affect overall
restore time? I've should've tried it myself but I can't, my "regular"
pg_restore has been running for 4+ hours, can't kill now ...

Thanks






__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Programatically switching database
Next
From: Kenneth Gonsalves
Date:
Subject: schema