pgsql: Convert FastPathStrongRelationLocks to atomics.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert FastPathStrongRelationLocks to atomics.
Date: 2026-09-04 18:03:45
Message-ID: E1x2YGO-00000003TyJ-2aIX@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Convert FastPathStrongRelationLocks to atomics.

Currently, the lock counts are unsigned integers protected by a
spinlock. By converting them to atomic variables, we can remove
the spinlock and the FastPathStrongRelationLockData wrapper struct.

Reviewed-by: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Tested-by: solai v <solai(dot)cdac(at)gmail(dot)com>
Discussion: https://postgr.es/m/alAJeRRzehDjLaF1%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74c77052bc20017076100f0649ca0f44b1b98c29

Modified Files
--------------
src/backend/storage/lmgr/lock.c | 57 ++++++++++++----------------------------
src/tools/pgindent/typedefs.list | 1 -
2 files changed, 17 insertions(+), 41 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-09-05 00:13:32 pgsql: Fix incorrect error message in xlogreader.c
Previous Message Nathan Bossart 2026-09-04 15:56:43 pgsql: Convert some ParallelBlockTableScanDescData fields to atomics.