Re: Block-level CRC checks

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block-level CRC checks
Date: 2008-11-13 19:20:04
Message-ID: 20081113192004.GD4062@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

> Basically, you can't make any critical changes to a shared buffer
> if you haven't got exclusive lock on it. But that's exactly what
> this patch is assuming it can do.

It seems to me that the only possible way to close this hole is to
acquire an exclusive lock before calling FlushBuffers, not shared.
This lock would be held until the flag has been examined and reset; the
actual WAL record and write would continue with a shared lock, as now.

I'm wary of this "solution" because it's likely to reduce concurrency
tremendously ... thoughts?

(The alternative seems to be to abandon this idea for hint bit logging;
we'll need something else.)

--
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 Alvaro Herrera 2008-11-13 19:25:40 Re: Block-level CRC checks
Previous Message Aidan Van Dyk 2008-11-13 19:10:42 Re: Block-level CRC checks