Skip to content

Commit a0e50e6

Browse files
committed
Include pid in pg_lock_status() results even for SIREAD locks.
Dan Ports
1 parent 8c250f3 commit a0e50e6

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy