Re: separating use of SerialSLRULock - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: separating use of SerialSLRULock
Date
Msg-id 202401291504.kxjyv6ewz6ub@alvherre.pgsql
Whole thread Raw
In response to separating use of SerialSLRULock  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: separating use of SerialSLRULock
List pgsql-hackers
On 2024-Jan-29, Alvaro Herrera wrote:

> In Dilip's patch to improve SLRU concurrency, there's a requirement to
> prevent predicate.c's SLRU control lock from being used to control
> access to another shared memory structure, SerialControlData.  This
> struct is used to keep track of the areas of the SLRU that are valid.
> Dilip just embedded that change into the patch he submitted, but I think
> the patch is actually wrong in detail, because it's leaving the
> SerialAdd() function unchanged to use SerialSLRULock, which is wrong
> because that function depends heavily on the contents of
> SerialControlData, and it also modifies it.

It's terrifying that SerialAdd() doesn't seem to be covered by any
tests, though.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"I think my standards have lowered enough that now I think 'good design'
is when the page doesn't irritate the living f*ck out of me." (JWZ)



pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: Should we remove -Wdeclaration-after-statement?
Next
From: Tom Lane
Date:
Subject: Re: PG versus libxml2 2.12.x