Re: BUG #13907: Restore materialized view throw permission denied - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13907: Restore materialized view throw permission denied
Date
Msg-id 26375.1469554367@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #13907: Restore materialized view throw permission denied  (Kevin Grittner <kgrittn@gmail.com>)
Responses Re: BUG #13907: Restore materialized view throw permission denied
List pgsql-bugs
Kevin Grittner <kgrittn@gmail.com> writes:
> On Tue, Jul 26, 2016 at 10:13 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Uh ... that the owner might revoke his own SELECT privilege?

> What about policies that might have changed since the latest
> REFRESH before dump?  How about views or functions that might have
> changed?

I think you're setting up straw men.  No one has argued that we should
dump and restore the verbatim current contents of a matview.  But there
is a longstanding expectation that pg_dump be able to dump and restore
the contents of read-only tables, and what you proposed breaks that.
That won't do.

It's possible that the most reasonable fix is to move matview refreshes to
after the ACL restoration step.  That would wreak a lot of havoc with
the current view of a dump as being tripartite (pre-data/data/post-data),
so it might be more work than we want to do.  But it seems like the
logically soundest thing.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: BUG #13907: Restore materialized view throw permission denied
Next
From: Kevin Grittner
Date:
Subject: Re: BUG #13907: Restore materialized view throw permission denied