Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags

Gregory Maxwell <gmaxwell@gmail.com>

From: Gregory Maxwell <gmaxwell@gmail.com>
To: "Jim C. Nasby" <jnasby@pervasive.com>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>, Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Gavin Sherry <swm@linuxworld.com.au>, pgsql-hackers@postgresql.org
Date: 2005-10-31T20:46:15Z
Lists: pgsql-hackers
On 10/31/05, Jim C. Nasby <jnasby@pervasive.com> wrote:
> On Mon, Oct 31, 2005 at 01:34:17PM -0500, Bruce Momjian wrote:
> > There is no way if the system has some incorrect value whether that
> > would later corrupt the data or not.  Anything the system does that it
> > shouldn't do is a potential corruption problem.
> But is it safe to say that there are areas where a failed assert is far
> more likely to result in data corruption? And that there's also areas
> where there's likely to be difficult/impossible to find bugs, such as
> race conditions? ISTM that it would be valuable to do some additional
> checking in these critical areas.

There are, no doubt, also places where an assert has minimal to no
performance impact. I'd wager a guess that the intersection of low
impact asserts, and asserts which measure high risk activities, is
small enough to be uninteresting.