Re: [GENERAL] Failure loading materialized view with pg_restore

2015-02-19 Thread Tom Lane
Brian Sutherland writes: > On Wed, Feb 18, 2015 at 10:34:33AM -0500, Tom Lane wrote: >> User "nobody" does not have permission to read table x, so the REFRESH >> fails, because the view's query executes as the view's owner. > If you grant select permission for the user nobody on x, pg_restore > s

Re: [GENERAL] Failure loading materialized view with pg_restore

2015-02-19 Thread Brian Sutherland
On Wed, Feb 18, 2015 at 10:34:33AM -0500, Tom Lane wrote: > Brian Sutherland writes: > > If I run this set of commands against PostgreSQL 9.4.1 I pg_restore > > throws an error with a permission problem. Why it does so is a mystery > > to me, given that the user performing the restore is a superus

Re: [GENERAL] Failure loading materialized view with pg_restore

2015-02-18 Thread Tom Lane
Brian Sutherland writes: > If I run this set of commands against PostgreSQL 9.4.1 I pg_restore > throws an error with a permission problem. Why it does so is a mystery > to me, given that the user performing the restore is a superuser: The same thing would happen without any dump and restore: re

Re: [GENERAL] Failure loading materialized view with pg_restore

2015-02-18 Thread Rémi Cura
Hey, pg_hba is to manage who has *access* to database. Your problem seems to be who has* SELECT permission* to x table. Cheers, Rémi-C 2015-02-18 12:03 GMT+01:00 BladeOfLight16 : > On Wed, Feb 18, 2015 at 5:48 AM, Brian Sutherland > wrote: > >> # dump and reload >> pg_dump --username sup

Re: [GENERAL] Failure loading materialized view with pg_restore

2015-02-18 Thread BladeOfLight16
On Wed, Feb 18, 2015 at 5:48 AM, Brian Sutherland wrote: > # dump and reload > pg_dump --username super --format c -f dump.dump orig > createdb copied > It might be helpful to dump in the plain SQL format and look at what it's doing.

[GENERAL] Failure loading materialized view with pg_restore

2015-02-18 Thread Brian Sutherland
Hi, If I run this set of commands against PostgreSQL 9.4.1 I pg_restore throws an error with a permission problem. Why it does so is a mystery to me, given that the user performing the restore is a superuser: # superuser creates database and materialized view createuser -s super creat