I thought that this might be a small quality of life improvement for
people scrolling through logs wondering which tranche name wasn't
registered.
--
Tristan Partin
Neon (https://neon.tech)
From 63c8d92a8a82acc5f8859ab47da5105cef46b88e Mon Sep 17 00:00:00 2001
From: Tristan Partin <tris...@neon.tech>
Date: Thu, 2 May 2024 11:05:04 -0500
Subject: [PATCH v1] Specify tranche name in error when not registeed
Useful when tracking down which tranch isn't registered.
---
src/backend/storage/lmgr/lwlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index b1e388dc7c9..e370b54d9fd 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -593,7 +593,7 @@ GetNamedLWLockTranche(const char *tranche_name)
lock_pos += NamedLWLockTrancheRequestArray[i].num_lwlocks;
}
- elog(ERROR, "requested tranche is not registered");
+ elog(ERROR, "requested tranche (%s) is not registered", tranche_name);
/* just to keep compiler quiet */
return NULL;
--
Tristan Partin
Neon (https://neon.tech)