Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.

Noah Misch <noah@leadboat.com>

Commit: 41e0ba33d5ab2b2301aa5d932836927bf69a76a8
Author: Noah Misch <noah@leadboat.com>
Date: 2024-09-24T22:25:23Z
Releases: 15.9
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.aa.nmisch@google.com

Files

PathChange+/−
src/backend/storage/lmgr/lock.c modified +10 −0

Discussion