Re: Fastest DB restore options

Поиск
Список
Период
Сортировка
От ogjunk-pgjedan@yahoo.com
Тема Re: Fastest DB restore options
Дата
Msg-id 584838.18991.qm@web50301.mail.yahoo.com
обсуждение исходный текст
Ответ на Fastest DB restore options  (ogjunk-pgjedan@yahoo.com)
Ответы Re: Fastest DB restore options  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-admin
----- Original Message ----
From: Tom Lane <tgl@sss.pgh.pa.us>

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.

OG: right.  I won't use -d then.

>  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.

OG: even when upgrading (8.0.3 -> 8.2.3)?  I'll dump with pg_dump from 8.0.3 and them import with pg_restore from the
newlyinstalled 8.2.3.  Wouldn't I *have to* use --ignore-version for that to work? 

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

OG: Thanks for the pointer!

Otis




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

Предыдущее
От: "Danyelle Gragsone"
Дата:
Сообщение: Re: UNSUBSCRIBE
Следующее
От: "Karthikeyan Sundaram"
Дата:
Сообщение: Online archiving