Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e5ef3a

Browse files
committed
Drop "Lock" suffix from LWLock wait event names
Commitda952b4 unintentially reverted the SQL-visible part ofcommit14a9101, which breaks queries joining pg_wait_events withpg_stat_acivity. Remove the suffix again.Backpatch to 17.Reported-by: Christophe Courtois <christophe.courtois@dalibo.com>Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/18728-450924477056a339%40postgresql.orgDiscussion:https://postgr.es/m/Z01w1+LihtRiS0Te@ip-10-97-1-34.eu-west-3.compute.internal
1 parent4cc2a44 commit1e5ef3a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎src/backend/storage/lmgr/generate-lwlocknames.pl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
$lastlockidx =$lockidx;
108108
$continue =",\n";
109109

110+
# Add a "Lock" suffix to each lock name, as the C code depends on that
110111
print$h"#define${lockname}Lock (&MainLWLockArray[$lockidx].lock)\n";
111112
}
112113

‎src/backend/storage/lmgr/lwlock.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ StaticAssertDecl(LW_VAL_EXCLUSIVE > (uint32) MAX_BACKENDS,
108108
/*
109109
* There are three sorts of LWLock "tranches":
110110
*
111-
* 1. The individually-named locks defined inlwlocknames.h each have their
111+
* 1. The individually-named locks defined inlwlocklist.h each have their
112112
* own tranche. We absorb the names of these tranches from there into
113113
* BuiltinTrancheNames here.
114114
*
@@ -124,7 +124,7 @@ StaticAssertDecl(LW_VAL_EXCLUSIVE > (uint32) MAX_BACKENDS,
124124
* ... and do not forget to update the documentation's list of wait events.
125125
*/
126126
staticconstchar*constBuiltinTrancheNames[]= {
127-
#definePG_LWLOCK(id,lockname) [id]=CppAsString(lockname)"Lock",
127+
#definePG_LWLOCK(id,lockname) [id]=CppAsString(lockname),
128128
#include"storage/lwlocklist.h"
129129
#undefPG_LWLOCK
130130
[LWTRANCHE_XACT_BUFFER]="XactBuffer",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp