pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: maxim.boguk@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18387: Erroneous permission checks and/or misleading error messages with refresh materialized view
Date: Mon, 11 Mar 2024 19:21:50 -0400
Message-ID: <Ze-SDjLjiBfSvGlE@momjian.us> (raw)
In-Reply-To: <36bb333d-13ec-4f8e-af33-48249ca2fe69@iki.fi>
References: <18387-12041858d9efb6f6@postgresql.org>
	<36bb333d-13ec-4f8e-af33-48249ca2fe69@iki.fi>

On Tue, Mar 12, 2024 at 01:02:16AM +0200, Heikki Linnakangas wrote:
> On 11/03/2024 22:10, PG Bug reporting form wrote:
> > Reproducer log (starting from interesting part):
> > test=# REFRESH MATERIALIZED VIEW CONCURRENTLY test_mv;
> > REFRESH MATERIALIZED VIEW
> > test=# alter materialized view test_mv owner to test_role;
> > ALTER MATERIALIZED VIEW
> > test=# REFRESH MATERIALIZED VIEW CONCURRENTLY test_mv;
> > ERROR:  permission denied for table test
> > --what??? N1
> > 
> > --check that im not hallucinating
> > test=# select * from test;
> >   val
> > -----
> >     1
> > (1 row)
> 
> So far, this is working correctly. REFRESH MATERIALIZED VIEW runs with the
> permissions of the materialized view's owner. In this case, the owner is
> 'test_role', which doesn't have select permission on the table.

Can we do a better job of suggesting the cause of the failure?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.





view thread (11+ messages)  latest in thread

Message-ID: <Ze-SDjLjiBfSvGlE@momjian.us>
Permalink:  ../Ze-SDjLjiBfSvGlE@momjian.us/
Also on:    postgresql.org/message-id/Ze-SDjLjiBfSvGlE@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, hlinnaka@iki.fi, maxim.boguk@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18387: Erroneous permission checks and/or misleading error messages with refresh materialized view
  In-Reply-To: <Ze-SDjLjiBfSvGlE@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox