diff options
Diffstat (limited to 'src/include/storage')
-rw-r--r-- | src/include/storage/lock.h | 3 | ||||
-rw-r--r-- | src/include/storage/proc.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 68a3487d49f..9b2a421c32c 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -22,6 +22,7 @@ #include "storage/lockdefs.h" #include "storage/lwlock.h" #include "storage/shmem.h" +#include "utils/timestamp.h" /* struct PGPROC is declared in proc.h, but must forward-reference it */ typedef struct PGPROC PGPROC; @@ -446,6 +447,8 @@ typedef struct LockInstanceData LOCKMODE waitLockMode; /* lock awaited by this PGPROC, if any */ BackendId backend; /* backend ID of this PGPROC */ LocalTransactionId lxid; /* local transaction ID of this PGPROC */ + TimestampTz waitStart; /* time at which this PGPROC started waiting + * for lock */ int pid; /* pid of this PGPROC */ int leaderPid; /* pid of group leader; = pid if no group */ bool fastpath; /* taken via fastpath? */ diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 683ab64f76b..a777cb64a1c 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -181,6 +181,8 @@ struct PGPROC LOCKMODE waitLockMode; /* type of lock we're waiting for */ LOCKMASK heldLocks; /* bitmask for lock types already held on this * lock object by this backend */ + pg_atomic_uint64 waitStart; /* time at which wait for lock acquisition + * started */ bool delayChkpt; /* true if this proc delays checkpoint start */ |