Re: Block-level CRC checks

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, Gregory Stark <stark(at)enterprisedb(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-12-15 16:50:48
Message-ID: 20081215165048.GH4067@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jonah H. Harris escribió:
> On Mon, Dec 15, 2008 at 11:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> > We don't really have an acceptable solution for the conflict with hint
> > bit behavior. The shutdown issue is minor, agreed, but that's not the
> > stumbling block.
>
> Agreed on the shutdown issue. But, didn't this patch address the hint
> bit setting as discussed? After performing a cursory look at the
> patch, it appears that hint-bit changes are detected and a WAL entry
> is written on buffer flush if hint bits had been changed. I don't see
> anything wrong with this in theory. Am I missing something?

That only does heap hint bits, but it does nothing about pd_flags, the
btree flags (btpo_cycleid I think), and something else I don't recall at
the moment. This was all solvable however. The big problem with it was
that it was using a new bit in pd_flags in unsafe ways. To make it safe
you'd have to grab a lock on the page, which is very probably problematic.

> Now, in the case where hint bits have been updated and a WAL record is
> required because the buffer is being flushed, requiring the WAL to be
> flushed up to that point may be a killer on performance. Has anyone
> tested it?

I didn't measure it but I'm sure it'll be plenty slow.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-12-15 17:01:30 Re: Restore enforce_generic_type_consistency's breaks a farms
Previous Message Tom Lane 2008-12-15 16:38:53 Re: Restore enforce_generic_type_consistency's breaks a farms