Re: Programatically switching database

Поиск
Список
Период
Сортировка
От ow
Тема Re: Programatically switching database
Дата
Msg-id 20031116051842.57962.qmail@web21404.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Programatically switching database  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: Programatically switching database
Re: Programatically switching database
COPY
Список 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 по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Programatically switching database
Следующее
От: Kenneth Gonsalves
Дата:
Сообщение: schema