Re: restore OIDs

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: restore OIDs
Дата
Msg-id 1521193252.2501.2.camel@cybertec.at
обсуждение исходный текст
Ответ на restore OIDs  (Dino Mifsud <dinomifsud74@gmail.com>)
Список pgsql-admin
Dino Mifsud wrote:
> I have a table where I am  storing images in a column of type OID which is
> pointing to the pg_largeobject table. 
> 
> Now when I try do a pg_dump and restore just a schema from one database to another
> with the below commands, the OID column in the table is correctly restored with the
> original number  but the pg_largeobject table in the restored database does not contain
> these OID entries that store the actual image bytes and therefore the images are not restored.
>
> pg_dump --data-only --host localhost --port 5432 --username "postgres" --schema=myschema \
>         --format custom --verbose --file "/Users/myuser/Work/databases_backup/original.backup" "db1"
>
> pg_restore --host localhostd --port 5432 --username "postgres" --schema=myshcema \
>            --disable-triggers -d db2 "/Users/myuser/Work/databases_backup/original.backup"
> 
> 
> How can I dump and restore correctly just a particular schema?

If you use the --schema option, but want to dump large objects too, add the --blobs option.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com


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

Предыдущее
От: Dino Mifsud
Дата:
Сообщение: restore OIDs
Следующее
От:
Дата:
Сообщение: Connect to db denied for superuser inherited by group