Re: Block-level CRC checks - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Block-level CRC checks
Date
Msg-id 20081113194743.GF4062@alvh.no-ip.org
Whole thread Raw
In response to Re: Block-level CRC checks  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> 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.

We don't seem to have an API for reducing LWLock strength though ...

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Block-level CRC checks
Next
From: Tom Lane
Date:
Subject: Re: Simple postgresql.conf wizard