v2-0002-Add-information-about-line-contents-on-parsing-fa.patch
text/x-diff
Filename: v2-0002-Add-information-about-line-contents-on-parsing-fa.patch
Type: text/x-diff
Part: 1
Patch
Format: format-patch
Series: patch v2-0002
Subject: Add information about line contents on parsing failure of wait_event_names.txt
| File | + | − |
|---|---|---|
| src/backend/utils/activity/generate-wait_event_types.pl | 1 | 1 |
From 8a826f4b502a2b3a55b4afc59ab8b3a042e1d623 Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@paquier.xyz>
Date: Thu, 13 Jul 2023 09:52:37 +0900
Subject: [PATCH v2 2/4] Add information about line contents on parsing failure
of wait_event_names.txt
The contents of the line whose parsing failed was not reported in the
error message produced by generate-wait_event_types.pl, making it harder
to debug.
Reported-by: Andres Freund
---
src/backend/utils/activity/generate-wait_event_types.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/utils/activity/generate-wait_event_types.pl b/src/backend/utils/activity/generate-wait_event_types.pl
index 2a9e341c58..f63c991051 100644
--- a/src/backend/utils/activity/generate-wait_event_types.pl
+++ b/src/backend/utils/activity/generate-wait_event_types.pl
@@ -72,7 +72,7 @@ my @lines_sorted =
# Read the sorted lines and populate the hash table
foreach my $line (@lines_sorted)
{
- die "unable to parse wait_event_names.txt"
+ die "unable to parse wait_event_names.txt for line $line\n"
unless $line =~ /^(\w+)\t+(\w+)\t+(\w+)\t+("\w.*\.")$/;
( my $waitclassname,
--
2.40.1