title: ERROR: must be owner of materialized view PostgreSQL
body: <p>I get the following error:</p>
  <pre><code>ERROR:  must be owner of materialized view mv_sessions
  SQL state: 42501
  </code></pre>
  <p>When trying to refresh my materialized view:</p>
  <pre><code>REFRESH MATERIALIZED VIEW CONCURRENTLY partners.mv_sessions;
  </code></pre>
  <p>The owner of <code>mv_sessions</code> is my custom <code>master</code> user. And I've assigned all privileges to the sub user <code>partner</code> with which I'm trying to refresh the view.</p>
  <p>I do not want to make <code>partner</code> the owner of <code>mv_sessions</code>. And also there are other sub users that will need to be able to refresh the view.</p>
  <hr />
  <p>I tried with a trigger function:</p>
  <pre><code>BEGIN
      REFRESH MATERIALIZED VIEW CONCURRENTLY partners.mv_sessions;
      RETURN NULL;
  END 
  </code></pre>
  <p>Getting the same error:</p>
  <pre><code>psycopg2.errors.InsufficientPrivilege: must be owner of materialized view mv_sessions
  CONTEXT:  SQL statement &quot;REFRESH MATERIALIZED VIEW CONCURRENTLY partners.mv_sessions&quot;
  PL/pgSQL function partners.refresh_mv_sessions() line 3 at SQL statement
  </code></pre>
  <p>How do I fix this?</p>