summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRobert Haas2016-01-30 13:35:56 +0000
committerRobert Haas2016-02-01 21:13:15 +0000
commit874b3b86a898d07beea6e2143ab9827153cc8fc0 (patch)
tree9634e659e5ce849d59d0d1440f806b5fab6135da /src/include
parent1b4d0cffd00248df5c1c57239284e985ba82cf86 (diff)
Hack on lock transfer stuff.gathertest
XXX: I don't think this is the right design. It will require the workers to wait for the leader to perform the associated lock acquisitions, and then the leader will need to tell them, afterwards, that they can go exit. There's no obvious way to make that signalling work. Instead, I wonder if we shouldn't including bookkeeping information in the PROCLOCK structures somehow, so that the worker actually reassigns the locks to the leader directly. However, that has a couple of problems. One is that the leader might pick a bad time to die, orphaning locks. Another is that the leader wouldn't know how to associate the locks with its own resource owners. Hmm, need to think more about this.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/storage/lock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index 6b4e3655f8..e54c613929 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -23,6 +23,8 @@
#include "storage/lwlock.h"
#include "storage/shmem.h"
+/* avoid including lib/stringinfo.h */
+struct StringInfoData;
/* struct PGPROC is declared in proc.h, but must forward-reference it */
typedef struct PGPROC PGPROC;
@@ -520,6 +522,7 @@ extern void GrantAwaitedLock(void);
extern void RemoveFromWaitQueue(PGPROC *proc, uint32 hashcode);
extern Size LockShmemSize(void);
extern LockData *GetLockStatusData(void);
+extern int GetMyLocks(struct StringInfoData *buf);
extern xl_standby_lock *GetRunningTransactionLocks(int *nlocks);
extern const char *GetLockmodeName(LOCKMETHODID lockmethodid, LOCKMODE mode);