Re: BUG #11208: Refresh Materialized View Concurrently bug using user Postgres

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #11208: Refresh Materialized View Concurrently bug using user Postgres
Дата
Msg-id 1408456673.36657.YahooMailNeo@web122303.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на Re: BUG #11208: Refresh Materialized View Concurrently bug using user Postgres  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: BUG #11208: Refresh Materialized View Concurrently bug using user Postgres  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-bugs
Kevin Grittner <kgrittn@ymail.com> wrote:
> "bemanuel.pe@gmail.com" <bemanuel.pe@gmail.com> wrote:
>
>> tjma_dw=> set role user_dw;
>>
>> tjma_dw=> CREATE TABLE foo_data AS SELECT i, md5(random()::text) FROM
>> generate_series(1, 10) i;
>> SELECT 10
>> tjma_dw=> CREATE MATERIALIZED VIEW mv_foo AS SELECT * FROM foo_data;
>> SELECT 10
>> tjma_dw=> ALTER MATERIALIZED VIEW mv_foo OWNER TO user_dw;
>> ALTER MATERIALIZED VIEW
>> tjma_dw=> REFRESH MATERIALIZED VIEW mv_foo;
>> REFRESH MATERIALIZED VIEW
>> tjma_dw=> ALTER TABLE foo_data OWNER TO user_dw;
>> ALTER TABLE
>> tjma_dw=> REFRESH MATERIALIZED VIEW mv_foo;
>> REFRESH MATERIALIZED VIEW
>> tjma_dw=> create unique index on mv_foo (i);
>> CREATE INDEX
>
>> /pgsql/pg94/bin/psql -Upostgres -p 5434 tjma_dw
>
>> tjma_dw=# refresh materialized view CONCURRENTLY mv_foo;
>> ERROR:  permission denied for relation pg_temp_432971_2
>> CONTEXT:  SQL statement "DELETE FROM public.mv_foo mv WHERE ctid
>> OPERATOR(pg_catalog.=) ANY (SELECT diff.tid FROM
> pg_temp_10.pg_temp_432971_2
>> diff WHERE diff.tid IS NOT NULL AND diff.newdata IS NULL)"
>
> Yeah, that's a bug

Attached is my proposed fix.  I will push it in a day or two if there
are no objections.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: BUG #11208: Refresh Materialized View Concurrently bug using user Postgres
Следующее
От: mail@eduard-wulff.de
Дата:
Сообщение: BUG #11211: regexp_matches acts like a WHERE