From: | Jordan Gigov <coladict(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pg_restore misuse or bug? |
Date: | 2017-07-21 11:47:05 |
Message-ID: | CA+nBocAmQ+OPNSKUzaaLa-6eGYVw5KqexWJaRoGvrvLyDir9gg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | basti | 2017-07-21 12:31:36 | pg_dump and insert json with copy |
Previous Message | Scott Mead | 2017-07-21 11:23:54 | Re: Logging at schema level |