Re: odd behavior in materialized view - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: odd behavior in materialized view
Date
Msg-id 1362492361.40718.YahooMailNeo@web162904.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: odd behavior in materialized view  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> wrote:

> And I found another problem. When I ran the following SQLs in the
> master, PANIC error occurred in the standby.
>
>     CREATE TABLE hoge (i int);
>     INSERT INTO hoge VALUES (generate_series(1,100));
>     CREATE MATERIALIZED VIEW hogeview AS SELECT * FROM hoge;
>     VACUUM ANALYZE;
>
> The PANIC error messages that I got in the standby are
>
>     WARNING:  page 0 of relation base/12297/16387 is uninitialized
>     CONTEXT:  xlog redo visible: rel 1663/12297/16387; blk 0
>     PANIC:  WAL contains references to invalid pages
>     CONTEXT:  xlog redo visible: rel 1663/12297/16387; blk 0
>
> base/12297/16387 is the file of the materialized view 'hogeview'.

Yeah, that looks like it will be fixed by the fix for the first
problem.  The write of a first page without any rows to indicate
that it is a scannable empty relation must be WAL-logged.  I should
have something later today.

Thanks for spotting this.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Suggested new CF status: "Pending Discussion"
Next
From: Amit Kapila
Date:
Subject: Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]