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:25 +0000 (15:25 -0700)
commitb779d37a3db2555a1d6c571c09eeabfe1c5caeb5
tree965e48703547e23a5a74ffa4e90edb43814886a4
parentdc845383cd12dcbb09b468b2eea94bf549528a4b
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
src/include/storage/lock.h