Jonah H. Harris escribió:
> On Thu, Oct 2, 2008 at 1:44 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
> > How about when a hint bit is set and the page is not already dirty, set
> > the checksum to the "always valid" value? The problem I have with this
> > idea is that there would be lots of pages excluded from the CRC checks,
> > a non-trivial percentage of the time.
> I don't like that because it trades-off corruption detection (the
> whole point of this feature) for a slight performance improvement.
I agree that giving up corruption detection is not such a hot idea, but
what I'm intending to get back is not performance but correctness (in
this case protection from the torn page problem)
> > Maybe we could mix this with Simon's approach to counting hint bit
> > setting, and calculate a valid CRC on the page every n-th non-logged
> > change.
> I still think we should only calculate checksums on the actual write.
Well, if we could trade off a bit of performance for correctness, I
would give up on that :-) However, you're right that this tradeoff is
not what we're having here.
> And, this still seems to have an issue with WAL, unless Simon's
> original idea somehow included recording hint bit settings/dirtying
> the page in WAL.
I have to admit I don't remember exactly how it worked :-) I think the
idea was avoiding setting the page dirty until a certain number of hint
bit setting operations had been done (which I think means it's not
useful for the present purpose).
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
In response to
pgsql-hackers by date
|Next:||From: Ron Mayer||Date: 2008-10-02 20:30:21|
|Subject: Re: Interval output bug in HAVE_INT64_TIMESTAMP|
|Previous:||From: Alvaro Herrera||Date: 2008-10-02 20:13:49|
|Subject: Re: Block-level CRC checks|