From: ow <oneway_111@yahoo.com>
To: Jan Wieck <JanWieck@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Programatically switching database
Date: Sat, 15 Nov 2003 21:18:42 -0800 (PST)
Message-ID: <20031116051842.57962.qmail@web21404.mail.yahoo.com> (raw)
In-Reply-To: <3FB6DE5B.1020000@Yahoo.com>
--- 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
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: oneway_111@yahoo.com, JanWieck@yahoo.com
Subject: Re: Programatically switching database
In-Reply-To: <20031116051842.57962.qmail@web21404.mail.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