Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.
authorNoah Misch <[email protected]>
Tue, 24 Sep 2024 22:25:18 +0000 (15:25 -0700)
committerNoah Misch <[email protected]>
Tue, 24 Sep 2024 22:25:23 +0000 (15:25 -0700)
commit41e0ba33d5ab2b2301aa5d932836927bf69a76a8
treeec0160a50e4f4512dfa96ca095568a91935c063d
parent2eecaf4b8cfb495a77512b7123f2867319973d29
Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.

The current use always releases this locktag.  A planned use will
continue that intent.  It will involve more areas of code, making unlock
omissions easier.  Warn under debug_assertions, like we do for various
resource leaks.  Back-patch to v12 (all supported versions), the plan
for the commit of the new use.

Reviewed by Heikki Linnakangas.

Discussion: https://postgr.es/m/20240512232923[email protected]
src/backend/storage/lmgr/lock.c