pgsql: Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.
Date: 2024-09-24 22:27:58
Message-ID: E1stE0k-000khu-BV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f33bf1c7d501af56b257256349990ad9000dcffa

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

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2024-09-24 22:27:59 pgsql: Warn if LOCKTAG_TUPLE is held at commit, under debug_assertions.
Previous Message Jeff Davis 2024-09-24 22:18:49 pgsql: Allow length=-1 for NUL-terminated input to pg_strncoll(), etc.