pgsql: Move declarations related to locktags from lock.h to new locktag

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move declarations related to locktags from lock.h to new locktag
Date: 2026-03-21 05:50:11
Message-ID: E1w3pDu-000kOn-1o@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Move declarations related to locktags from lock.h to new locktag.h

This commit moves all the declarations related to locktags from lock.h
to a new header called locktag.h. This header is useful so as code
paths that care about locktags but not the lock hashtable can know about
these without having to include lock.h and all its set of dependencies.

This move includes the basic locktag structures and the set of macros to
fill in the locktag fields before attempting to acquire a lock.

Based on a suggestion from me, suggestion done while discussing a
different feature.

Author: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/abufUya2oK-_PJ3E@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/322bab79744dfb8f7ddb5191b3102cf7986d14a0

Modified Files
--------------
src/include/storage/lock.h | 173 +-------------------------------------
src/include/storage/locktag.h | 190 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 191 insertions(+), 172 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-03-22 06:26:33 pgsql: Add test for single-page VACUUM of hash index on INSERT
Previous Message Tom Lane 2026-03-20 22:23:52 pgsql: plpgsql: optimize "SELECT simple-expression INTO var".