pg_dump and truncate

Поиск
Список
Период
Сортировка
От Feng Chen
Тема pg_dump and truncate
Дата
Msg-id 0D1719326D64BD4E9F92A0C12023767801B2D5DF@eserv.covergence.com
обсуждение исходный текст
Ответы Re: pg_dump and truncate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hello there,

=20

I was trying to do a live db archive using the following steps:

=20

1.    Open a connection to the database;
2.    With the connection, do the following:

BEGIN;

SET transaction ISOLATION level SERIALIZABLE;

3.    Execute the following from the Linux shell:

pg_dump dbname | gzip -9 > dbname-archive.gz

=20

=20

4.    With the same connection, do the following:

truncate table1, table2,...;

end;

=20

Well, the tables are truncated all right, but the db dump file is
empty!!!

=20

What went wrong with my logic? What should be the correct procedure?


Thank you!


Feng

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: BUG #2969: Inaccuracies in Solaris FAQ
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump and truncate