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

Commit77a3082

Browse files
committed
pgrowlocks: fix bogus lock strength output
Per report from digoal@126.com
1 parenta11e15c commit77a3082

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎contrib/pgrowlocks/pgrowlocks.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@ pgrowlocks(PG_FUNCTION_ARGS)
247247
elseif (HEAP_XMAX_IS_KEYSHR_LOCKED(infomask))
248248
snprintf(values[Atnum_modes],NCHARS,"{For Key Share}");
249249
elseif (HEAP_XMAX_IS_EXCL_LOCKED(infomask))
250-
snprintf(values[Atnum_modes],NCHARS,"{For Update}");
250+
{
251+
if (tuple->t_data->t_infomask2&HEAP_KEYS_UPDATED)
252+
snprintf(values[Atnum_modes],NCHARS,"{For Update}");
253+
else
254+
snprintf(values[Atnum_modes],NCHARS,"{For No Key Update}");
255+
}
251256
else
252257
/* neither keyshare nor exclusive bit it set */
253258
snprintf(values[Atnum_modes],NCHARS,
@@ -256,9 +261,9 @@ pgrowlocks(PG_FUNCTION_ARGS)
256261
else
257262
{
258263
if (tuple->t_data->t_infomask2&HEAP_KEYS_UPDATED)
259-
snprintf(values[Atnum_modes],NCHARS,"{Key Update}");
260-
else
261264
snprintf(values[Atnum_modes],NCHARS,"{Update}");
265+
else
266+
snprintf(values[Atnum_modes],NCHARS,"{No Key Update}");
262267
}
263268

264269
values[Atnum_pids]=palloc(NCHARS*sizeof(char));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp