From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(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 & 0x01)", ) |
Date: | 2005-10-31 18:46:35 |
Message-ID: | 17961.1130784395@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
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
Attachment | Content-Type | Size |
---|---|---|
slru-race-2.patch | application/octet-stream | 8.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-10-31 18:50:40 | Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags |
Previous Message | Bruce Momjian | 2005-10-31 18:34:17 | Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-10-31 18:50:40 | Re: slru.c race condition (was Re: [HACKERS] TRAP: FailedAssertion("!((itemid)->lp_flags |
Previous Message | Bruce Momjian | 2005-10-31 18:34:17 | Re: slru.c race condition (was Re: TRAP: FailedAssertion("!((itemid)->lp_flags |