From: | Amit Kapila <amit(dot)kapila(at)huawei(dot)com> |
---|---|
To: | "'Greg Stark'" <stark(at)mit(dot)edu>, "'Simon Riggs'" <simon(at)2ndquadrant(dot)com> |
Cc: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Jim Nasby'" <jim(at)nasby(dot)net>, "'Jeff Davis'" <pgsql(at)j-davis(dot)com>, "'Florian Pflug'" <fgp(at)phlo(dot)org>, "'Jeff Janes'" <jeff(dot)janes(at)gmail(dot)com>, "'Andres Freund'" <andres(at)2ndquadrant(dot)com>, "'Fujii Masao'" <masao(dot)fujii(at)gmail(dot)com>, "'PostgreSQL-development'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: corrupt pages detected by enabling checksums |
Date: | 2013-05-10 16:31:19 |
Message-ID: | 001801ce4d9b$ce046ff0$6a0d4fd0$@kapila@huawei.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Friday, May 10, 2013 6:09 PM Greg Stark wrote:
> On Fri, May 10, 2013 at 7:44 AM, Simon Riggs <simon(at)2ndquadrant(dot)com>
> wrote:
> >> Having one corrupt record followed by a valid record is not an
> >> abnormal situation. It could easily be the correct end of WAL.
> >
> > I disagree, that *is* an abnormal situation and would not be the
> > "correct end-of-WAL".
> >
> > Each WAL record contains a "prev" pointer to the last WAL record. So
> > for the next record to be valid the prev pointer would need to be
> > exactly correct.
>
> Well then you're wrong. The OS makes no guarantee that blocks are
> written out in order. When the system crashes any random subset of the
> blocks written but not synced might have been written to disk and
> others not. There could be megabytes of correct WAL written with just
> one block in the middle of the first record not written. If no xlog
> sync had occurred (or one was in progress but not completed) then
> that's the correct end of WAL.
In the case where one block is missing, how can it even reach to next record
to check "prev" pointer.
I think it can be possible when one of the record is corrupt and following
are okay which I think is the
case in which it can proceed with warning as suggested by Simon.
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Evan D. Hoffman | 2013-05-10 16:36:21 | Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4 |
Previous Message | Tom Lane | 2013-05-10 16:03:19 | Re: [PATCH] Make "psql -1 < file.sql" work as with "-f" |