Re: Fastest DB restore options

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fastest DB restore options
Дата
Msg-id 5872.1172161521@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Fastest DB restore options  (ogjunk-pgjedan@yahoo.com)
Список pgsql-admin
ogjunk-pgjedan@yahoo.com writes:
> I normally dump with these options:
>   -d MyDB --clean --inserts --column-inserts --format=P
> But the last time I tried that, the restore took foreeeeeeeeeeeeeever.

--inserts is pretty expensive.

>  So I'm looking for the fastest way to import data from the old DB to the new one.  Judging from pg_dump man page the
followingshould be the fastest dump & restore: 

>   -d MyDB --format=c --ignore-version

Don't use --ignore-version; it's a good way to shoot yourself in the foot.

pg_dump's default behavior is about as good as you can get; there are no
optional switches that will make it faster.  What you *can* do is make
sure that the receiving system is properly configured before you start
the restore --- increase maintenance_work_mem and checkpoint_segments
in particular.  See this page, especially the last section:
http://www.postgresql.org/docs/8.2/static/populate.html

            regards, tom lane

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

Предыдущее
От: Naomi Walker
Дата:
Сообщение: Re: Fastest DB restore options
Следующее
От: "jose carlos de la toba duarte"
Дата:
Сообщение: UNSUBSCRIBE