Include pid in pg_lock_status() results even for SIREAD locks.

Dan Ports
This commit is contained in:
Robert Haas 2011-04-04 13:20:18 -04:00
parent 8c250f3741
commit a0e50e698b

View File

@ -368,7 +368,10 @@ pg_lock_status(PG_FUNCTION_ARGS)
/* lock holder */
values[10] = VXIDGetDatum(xact->vxid.backendId,
xact->vxid.localTransactionId);
nulls[11] = true; /* pid */
if (xact->pid != 0)
values[11] = Int32GetDatum(xact->pid);
else
nulls[11] = true;
/*
* Lock mode. Currently all predicate locks are SIReadLocks, which are