pgsql: Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions. - Mailing list pgsql-committers

From Noah Misch
Subject pgsql: Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.
Date
Msg-id E1stE0k-000kiY-Hi@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5ef9b4a2f79670a1cf9649e568fba7920a72e9a4

Modified Files
--------------
src/backend/storage/lmgr/lock.c | 10 ++++++++++
1 file changed, 10 insertions(+)


pgsql-committers by date:

Previous
From: Noah Misch
Date:
Subject: pgsql: Fix data loss at inplace update after heap_update().
Next
From: Noah Misch
Date:
Subject: pgsql: Fix use of uninitialized value in previous commit.