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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-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
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Browne | 2005-10-31 19:17:13 | Re: 8.1 Release Candidate 1 Coming ... |
Previous Message | Tom Lane | 2005-10-31 18:46:35 | Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags & 0x01)", ) |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-10-31 19:19:46 | Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags & 0x01)", ) |
Previous Message | Tom Lane | 2005-10-31 18:46:35 | Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags & 0x01)", ) |