SV: Refreshing materialized views

From: Henrik Uggla <Henrik(dot)Uggla(at)kristianstad(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: SV: Refreshing materialized views
Date: 2017-11-28 14:48:12
Message-ID: dbc16879aa424296bb1c4950c732cb57@kristianstad.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The underlying tables are foreign tables. The user has been mapped to a foreign user with select permission. I have no problem selecting from the foreign tables or the materialized views.

This is the error in the log (not very useful):
2017-11-28 13:58:03.207 UTC [347] STATEMENT: REFRESH MATERIALIZED VIEW kust_havsplan.fornlamning_linje WITH DATA;
2017-11-28 13:58:47.412 UTC [296] ERROR: permission denied for relation fornlamning_linje

Regards
Henrik
________________________________________
Från: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Skickat: den 28 november 2017 15:25:47
Till: Henrik Uggla
Kopia: pgsql-general(at)lists(dot)postgresql(dot)org
Ämne: Re: Refreshing materialized views

Henrik Uggla <Henrik(dot)Uggla(at)kristianstad(dot)se> writes:
> I created some materialized views and set a group as owner. My problem is that I can't refresh the views. I get "permission denied" even when using the postgres super user. If I change the owner to an ordinary user I still can't refresh the view as the owner or postgres. Only if I change owner to postgres am I able to refresh the view, but only as the postgres user. I've mainly tried with Pgadmin4 but also a few times with psql, and the database is installed as a docker container. Please help.

Apparently, the view owner lacks select permission on some underlying
table. Pay attention to what is being denied access to.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-11-28 15:18:35 Re: SV: Refreshing materialized views
Previous Message Dilip Kumar 2017-11-28 14:45:09 Re: ERROR: too many dynamic shared memory segments