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. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general