Re: Race conditions, race conditions!

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Race conditions, race conditions!
Date: 2005-05-08 17:04:44
Message-ID: 20050508170444.GB88920@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, May 07, 2005 at 07:20:48PM -0400, Tom Lane wrote:
> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > I wonder if there's an argument for building assertion-enabled builds with
> > code that randomly yields the processor some percentage of time before and
> > after taking a lock. It wouldn't catch every case but it might help.
>
> Seems like that would mainly help you find cases where you'd put a lock
> acquire or release a bit too late or too soon in a sequence of events;
> not cases where you'd failed to acquire a needed lock at all. It'd be
> more useful I think to have a facility that randomly stops backends for
> awhile regardless of exactly where they are in the code.
>
> A high-load test case actually does this to some extent, but the problem
> is you have little reproducibility and no assurance that execution
> stopped for long enough to let critical events happen elsewhere. The
> ideal facility I think would slow one backend much more than others,
> whereas high load still leaves them all making progress at about the
> same rate ...

Would setting different priorities/niceness on different backends during
the stress test help? It might not be perfect but it should be trivial
to accomplish...
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew - Supernews 2005-05-08 17:47:04 Re: Views, views, views! (long)
Previous Message Dennis Bjorklund 2005-05-08 17:00:15 lastval()