From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: odd behavior in materialized view |
Date: | 2013-03-07 17:28:51 |
Message-ID: | CAHGQGwHQuio9H3jhMGn01NujWor+PgLh9=3Z3K-qoqgKQGrU_Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 8, 2013 at 1:52 AM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
>> Thanks! I confirmed that the problem that I reported has
>> disappeared in HEAD.
>>
>> Unfortunately I found another odd behavior. When I accessed the
>> MV after VACUUM ANALYZE, I got the following error.
>>
>> ERROR: materialized view "hogeview" has not been populated
>> HINT: Use the REFRESH MATERIALIZED VIEW command.
>> STATEMENT: select * from hogeview where i < 10;
>>
>> The test case to reproduce that is:
>>
>> create table hoge (i int);
>> insert into hoge values (generate_series(1,100000));
>> create materialized view hogeview as select * from hoge where i % 2 = 0;
>> create index hogeviewidx on hogeview (i);
>> delete from hoge;
>> refresh materialized view hogeview;
>> select * from hogeview where i < 10;
>> vacuum analyze;
>> select * from hogeview where i < 10;
>>
>> The last SELECT command caused the above error.
>
> Thanks. Will fix.
Thanks!
I found one typo in the document of MV. Please see the attached patch.
Regards,
--
Fujii Masao
Attachment | Content-Type | Size |
---|---|---|
typo.patch | application/octet-stream | 520 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-03-07 17:30:43 | REFRESH MATERIALIZED VIEW locklevel |
Previous Message | David E. Wheeler | 2013-03-07 17:14:57 | Re: Materialized views WIP patch |