Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.
authorNoah Misch <noah@leadboat.com>
Tue, 24 Sep 2024 22:25:18 +0000 (15:25 -0700)
committerNoah Misch <noah@leadboat.com>
Tue, 24 Sep 2024 22:25:24 +0000 (15:25 -0700)
commit5ef9b4a2f79670a1cf9649e568fba7920a72e9a4
tree8ad61bc979a3b0d1f0d8e35d83bfbd055e1deeac
parent1299564cb9c787de3068777eaf8440fd0fceca4a
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: http://postgr.es/m/20240512232923.aa.nmisch@google.com
src/backend/storage/lmgr/lock.c