[GENERAL] pg_restore misuse or bug?

Поиск
Список
Период
Сортировка
От Jordan Gigov
Тема [GENERAL] pg_restore misuse or bug?
Дата
Msg-id CA+nBocAmQ+OPNSKUzaaLa-6eGYVw5KqexWJaRoGvrvLyDir9gg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] pg_restore misuse or bug?
Список pgsql-general
So we have this database dump created using "pg_dump -Fc ourdb >
file.dump" that has a Materialized View that gets refreshed under
certain conditions by our Java web-app.

When running pg_restore as the superuser it gives the following error
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3253; 0 320628
MATERIALIZED VIEW DATA combined_query_data web_user
pg_restore: [archiver (db)] could not execute query: ERROR:
permission denied for relation first_table_in_from_list
    Command was: REFRESH MATERIALIZED VIEW combined_query_data;

If we run it as "pg_restore -d ourdb file.dump" it is treated as a
warning, and the restore is successful, except for the data in the MV.
We have to run the command separately in order to fill the data.
If we run it as "pg_restore -d ourdb -1 file.dump", then it becomes a
fatal error and rolls back the transaction.

I see no reason why the superuser would get a "permission denied"
error. Is this a bug or am I doing something wrong.


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

Предыдущее
От: Scott Mead
Дата:
Сообщение: Re: [GENERAL] Logging at schema level
Следующее
От: basti
Дата:
Сообщение: [GENERAL] pg_dump and insert json with copy