Re: corrupt pages detected by enabling checksums - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: corrupt pages detected by enabling checksums
Date
Msg-id CA+U5nMLzhJibxKOa00bg3bqre-23fi-kgv=ogyEpCtLSKGqnMw@mail.gmail.com
Whole thread Raw
In response to Re: corrupt pages detected by enabling checksums  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On 3 May 2013 21:53, Jeff Davis <pgsql@j-davis.com> wrote:

> At this point, I don't think more changes are required.

After detailed further analysis, I agree, no further changes are required.

I think the code in that area needs considerable refactoring to
improve things. I've looked for an easy way to avoid calling
PageSetLSN() twice, but I don't see one, which is the thing I thought
was a problem. I don't much like the nested critical sections either.
But overall, we do follow the requirements for WAL laid out in the
README, in that we dirty the buffer first, insert WAL, then set LSN,
all within a critical section and with buffer locking. So I don't see
any place where this will break with the current coding.

In the future I would hope to see that code simplified so that we do
just one WAL record per block, rather than the 3 (or more?) records
that can get written now: freeze, clean and visibility.

--Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Gavin Flower
Date:
Subject: Re: Documentation epub format
Next
From: Ian Lawrence Barwick
Date:
Subject: Re: 9.3 release notes suggestions