Re: Dump all the indexes/constraints/roles

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Dump all the indexes/constraints/roles
Дата
Msg-id CAMkU=1yd9KyVEOKnUBduLAQTeHVyvJ+7MgG40i5qD1E9YiD0FQ@mail.gmail.com
обсуждение исходный текст
Ответ на Dump all the indexes/constraints/roles  (Patrick B <patrickbakerbr@gmail.com>)
Ответы Re: Dump all the indexes/constraints/roles  (Patrick B <patrickbakerbr@gmail.com>)
Список pgsql-general
On Mon, Oct 17, 2016 at 8:32 PM, Patrick B <patrickbakerbr@gmail.com> wrote:
Hi guys,

I need to export an entire database to another server, for testing purpose.

Is there any way to export all indexes and constraints ?
Postgres 9.2
Patrick

By default pg_dump will export the constraints.  It will export the definition of the indexes, but not the physical contents of them, so they have to be recreated upon import.  That can be slow depending on the sizes and types involved.

Or you can clone the whole thing with pg_basebackup.  (If you have multiple databases on the same cluster, this will take all of them.  The only thing you can do about that is drop the ones you don't want.)

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Generic way to test input arguments
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: tablesample performance