2014-08-18 18:25 GMT-03:00 Bruno Silva <[email protected]>:

> 2014-08-18 18:13 GMT-03:00 Matheus de Oliveira <[email protected]>
> :
>
> VocĂȘ mesmo pode postar na -bugs com o mesmo caso de teste. ;-)
>
>
> Beleza, muito obrigado pessoal.
>
> Bruno E. A. Silva.
>

Pra fechar a thread segue o email de retorno :
----------------------------------------------------------------------
Yeah, that's a bug; or probably two.  I can simplify the test case:

CREATE ROLE user_dw;
SET ROLE user_dw;
CREATE TABLE foo_data AS SELECT i, md5(random()::text)
  FROM generate_series(1, 10) i;
CREATE MATERIALIZED VIEW mv_foo AS SELECT * FROM foo_data;
CREATE UNIQUE INDEX ON mv_foo (i);
RESET ROLE;
REFRESH MATERIALIZED VIEW CONCURRENTLY mv_foo;

It is running afoul of a security measure (the query to repopulate
data is run as the owner of the materialized view, to prevent
placing trojan horses for a superuser).  But it seems to be
creating the temporary table as the superuser, preventing even the
owner from running the REFRESH ... CONCURRENTLY.  The query that is
being displayed is internal; we should probably find a way to show
the statement that was run at the top level instead.

I'll look at fixing both.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
----------------------------------------------------------------------

Bruno E. A. Silva.
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a