Skip site navigation (1) Skip section navigation (2)

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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org, Jim Nasby <jnasby(at)pervasive(dot)com>,Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Subject: Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags
Date: 2005-10-31 18:50:40
Message-ID: 200510311850.j9VIoe016872@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
OK, this is the way to fix for 8.0 and earlier.  It is up to you about
8.1.  I think we can handle the larger patch if we do another RC.

---------------------------------------------------------------------------

Tom Lane wrote:
> I wrote:
> > I think it would be possible to fix it in a less invasive way by taking
> > and releasing the ControlLock an extra time in SimpleLruReadPage and
> > SimpleLruWritePage.  What's indeterminate about that is the performance
> > cost.
> 
> Attached is an alternative patch that does it this way.  I realized that
> we could use LWLockConditionalAcquire to usually avoid any extra lock
> traffic, so the performance cost may be negligible except under the very
> heaviest of loads.  I still like the bigger patch for 8.2 and forward,
> because it's a lot cleaner, but this seems like a credible alternative
> for 8.1 and back branches.
> 
> Comments?
> 
> 			regards, tom lane
> 

Content-Description: slru-race-2.patch

[ Type application/octet-stream treated as attachment, skipping... ]

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Chris BrowneDate: 2005-10-31 19:17:13
Subject: Re: 8.1 Release Candidate 1 Coming ...
Previous:From: Tom LaneDate: 2005-10-31 18:46:35
Subject: Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags & 0x01)",)

pgsql-patches by date

Next:From: Tom LaneDate: 2005-10-31 19:19:46
Subject: Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags & 0x01)",)
Previous:From: Tom LaneDate: 2005-10-31 18:46:35
Subject: Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags & 0x01)",)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group