Re: Allowing parallel pg_restore from pipe

Поиск
Список
Период
Сортировка
От Timothy Garnett
Тема Re: Allowing parallel pg_restore from pipe
Дата
Msg-id CAPcyiQ0GZMgFJvbXG=DCVktj=MgcdDNSFoLMxNuRyYOa6S6e1g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allowing parallel pg_restore from pipe  (Shaun Thomas <sthomas@optionshouse.com>)
Список pgsql-hackers
> If you need something like this short term, we actually found a way to do it
> ourselves for a migration we performed back in October. The secret is xargs
> with the -P option:
>
> xargs -I{} -P 8 -a table-list.txt \
>     bash -c "pg_dump -Fc -t {} my_db | pg_restore -h remote -d my_db"
>
> Fill table-list.txt with as many, or as few tables as you want. The above
> example would give you 8 parallel threads. Well equipped systems may be able
> to increase this.
>
> Admittedly it's a gross hack, but it works. :)

I think you'd have to be real careful around foreign key constraints
for that to work.

Tim



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

Предыдущее
От: Shaun Thomas
Дата:
Сообщение: Re: Allowing parallel pg_restore from pipe
Следующее
От: David Powers
Дата:
Сообщение: Re: streaming replication, "frozen snapshot backup on it" and missing relfile (postgres 9.2.3 on xfs + LVM)