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

Commita0e50e6

Browse files
committed
Include pid in pg_lock_status() results even for SIREAD locks.
Dan Ports
1 parent8c250f3 commita0e50e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/utils/adt/lockfuncs.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,10 @@ pg_lock_status(PG_FUNCTION_ARGS)
368368
/* lock holder */
369369
values[10]=VXIDGetDatum(xact->vxid.backendId,
370370
xact->vxid.localTransactionId);
371-
nulls[11]= true;/* pid */
371+
if (xact->pid!=0)
372+
values[11]=Int32GetDatum(xact->pid);
373+
else
374+
nulls[11]= true;
372375

373376
/*
374377
* Lock mode. Currently all predicate locks are SIReadLocks, which are

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp