Re: separating use of SerialSLRULock

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Subject: Re: separating use of SerialSLRULock
Date: 2024-01-29 15:04:33
Message-ID: 202401291504.kxjyv6ewz6ub@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-29 15:19:47 Re: PG versus libxml2 2.12.x
Previous Message Jelte Fennema-Nio 2024-01-29 15:03:44 Re: Should we remove -Wdeclaration-after-statement?