pgsql: lwlock: Remove support for disowned lwlwocks

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: lwlock: Remove support for disowned lwlwocks
Date: 2026-01-15 19:59:29
Message-ID: E1vgTVA-000fhX-39@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

lwlock: Remove support for disowned lwlwocks

This reverts commit f8d7f29b3e81db59b95e4b5baaa6943178c89fd8, plus parts of
subsequent commits fixing a typo in a parameter name.

Support for disowned lwlocks was added for the benefit of AIO, to be able to
have content locks "owned" by the AIO subsystem. But as of commit fcb9c977aa5,
content locks do not use lwlocks anymore.

It does not seem particularly likely that we need this facility outside of the
AIO use-case, therefore remove the now unused functions.

I did choose to keep the comment added in the aforementioned commit about
lock->owner intentionally being left pointing to the last owner.

Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Discussion: https://postgr.es/m/cj5mcjdpucvw4a54hehslr3ctukavrbnxltvuzzhqnimvpju5e@cy3g3mnsefwz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d40fd85187d06f7bd16fb4d0067bad0b1d248718

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 71 ++++-----------------------------------
src/include/storage/lwlock.h | 2 --
2 files changed, 6 insertions(+), 67 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-01-15 23:15:26 pgsql: Add pg_clear_extended_stats()
Previous Message Andres Freund 2026-01-15 19:28:47 pgsql: bufmgr: Implement buffer content locks independently of lwlocks