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

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

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

I realized that there's some coverage when compiling with
TEST_SUMMARIZE_SERIAL, so I tried that and it looks OK.

One other change I made was in the comment that explains the locking
order.  I had put the new lock at the top, but when I tested adding some
asserts to verify that the other locks are not held, they turn out to
fire soon enough ... and the conflicting lock is the last one of that
list.  So I added the new lock below it, and the SLRU lock further down,
because SerialAdd does it that way.

I pushed it now.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Gabriele Bartolini
Date:
Subject: Re: Possibility to disable `ALTER SYSTEM`
Next
From: Dagfinn Ilmari Mannsåker
Date:
Subject: Re: Bytea PL/Perl transform