public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tristan Partin <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Specify tranch name in error when not registered
Date: Thu, 02 May 2024 11:23:06 -0500
Message-ID: <[email protected]> (raw)

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)


Attachments:

  [text/x-patch] v1-0001-Specify-tranche-name-in-error-when-not-registeed.patch (932B, ../[email protected]/2-v1-0001-Specify-tranche-name-in-error-when-not-registeed.patch)
  download | inline diff:
From 63c8d92a8a82acc5f8859ab47da5105cef46b88e Mon Sep 17 00:00:00 2001
From: Tristan Partin <[email protected]>
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)



view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Specify tranch name in error when not registered
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox