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

Commit5ffbbcf

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 parent7a35052 commit5ffbbcf

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
@@ -111,7 +111,7 @@ StaticAssertDecl(LW_VAL_EXCLUSIVE > (uint32) MAX_BACKENDS,
111111
/*
112112
* There are three sorts of LWLock "tranches":
113113
*
114-
* 1. The individually-named locks defined inlwlocknames.h each have their
114+
* 1. The individually-named locks defined inlwlocklist.h each have their
115115
* own tranche. We absorb the names of these tranches from there into
116116
* BuiltinTrancheNames here.
117117
*
@@ -127,7 +127,7 @@ StaticAssertDecl(LW_VAL_EXCLUSIVE > (uint32) MAX_BACKENDS,
127127
* ... and do not forget to update the documentation's list of wait events.
128128
*/
129129
staticconstchar*constBuiltinTrancheNames[]= {
130-
#definePG_LWLOCK(id,lockname) [id]=CppAsString(lockname)"Lock",
130+
#definePG_LWLOCK(id,lockname) [id]=CppAsString(lockname),
131131
#include"storage/lwlocklist.h"
132132
#undefPG_LWLOCK
133133
[LWTRANCHE_XACT_BUFFER]="XactBuffer",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp