Re: How to restore to empty database

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to restore to empty database
Дата
Msg-id 332CC5FE386B4B86AAE5556896A635ED@dell2
обсуждение исходный текст
Ответ на Re: How to restore to empty database  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: How to restore to empty database
Список pgsql-general
Hi!

>You need to connect to a database that exists with --dbname, for
>instance --dbname=postgres. Postgres will then use that connection to
>create the new database, in your case mydb.

Thank you, this seems work.

There are total 24 databases, .backup files total size in 37GB , aprox 60 %
from this from bytea columns ( pdf documents, images).
Using VPS server, 4 cores, 11 GB RAM, used only for postgres.
Which is the fastest way to restore data from all of them to empty
databases. Should I run all commands in sequence like

pg_restore --clean --create --if-exists --verbose --dbname=postgres  --jobs=4
"database1.backup"
pg_restore --clean --create --if-exists --verbose --dbname=postgres  --jobs=4
"database2.backup"
...
pg_restore --clean --create --if-exists --verbose --dbname=postgres  --jobs=4
"database24.backup"

or run them all parallel without --jobs=4 like

pg_restore --clean --create --if-exists --verbose --dbname=postgres
"database1.backup" &
pg_restore --clean --create --if-exists --verbose --dbname=postgres
"database2.backup" &
...
pg_restore --clean --create --if-exists --verbose --dbname=postgres  --jobs=4
"database24.backup" &


or some balance between those ?
Is there some postgres or Debian setting which can used during restore time
to speed up restore ?
I use shared_buffers=1GB , other settings from debian installation.

Andrus. 




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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: ERROR: too many dynamic shared memory segments
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to restore to empty database