Re: pg_restore dumps all data to the terminal

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: pg_restore dumps all data to the terminal
Дата
Msg-id CAKFQuwap6TC_79diygXy1qOZP+=7XC4Mk_w8p=P7CORa6R=pGg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_restore dumps all data to the terminal  (Ron <ronljohnsonjr@gmail.com>)
Список pgsql-admin
On Thursday, April 26, 2018, Ron <ronljohnsonjr@gmail.com> wrote:

But... looking more carefully at the examples, I see that one must attach to the postgres db when you want pg_restore to create the database.  (That should be made clear in the --create section of the manual.)

" --create
 When this option is used, the database named with -d is used only to issue the initial DROP DATABASE and CREATE DATABASE commands. All data is restored into the database name that appears in the archive. "

You have to connect to a database in order to perform work in the cluster as a whole - which includes creating new databases.  The postgres database, being created by default, usually suffices but isn't mandatory.

For me the manual is clear but you can propose wording or even submit a patch if you feel it can be improved.

David J.

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

Предыдущее
От: Ron
Дата:
Сообщение: Re: pg_restore dumps all data to the terminal
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: vacuumdb causes memory drain.