Backup hot-standby database.

Поиск
Список
Период
Сортировка
От Stephen Rees
Тема Backup hot-standby database.
Дата
Msg-id 0515F2BB-0522-449C-848B-4E750F4D91BB@pandora.com
обсуждение исходный текст
Ответы Re: Backup hot-standby database.  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Backup hot-standby database.  (Robert Treat <rob@xzilla.net>)
Список pgsql-admin
Using PostgreSQL 9.0.x

I cannot use pg_dump to generate a backup of a database on a hot-
standby server, because it is, by definition, read-only. However, it
seems that I can use COPY TO within a serializable transaction to
create a consistent set of data file(s). For example,

BEGIN TRANSACTION;
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
COPY t1 TO '/tmp/t1';
COPY t2 TO '/tmp/t2';

... etc ...

COPY t<n> TO '/tmp/t<n>';
COMMIT TRANSACTION;

I can then use pg_dump to export the corresponding database schema
from the master DBMS.

Is this going to scale to a multi-GB database, where it will take
hours to export the data from all of the tables, or are there
scalability issues of which I should be aware?

Thanks in advance,

- SteveR

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: log timestamp since daylight saving time
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Backup hot-standby database.