diff options
author | Amit Kapila <akapila@postgresql.org> | 2020-03-21 08:48:06 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2020-03-21 08:48:06 +0530 |
commit | 3ba59ccc896e8877e2fbfb8d4f148904cad5f9b0 (patch) | |
tree | 6403763e7c7e519113b8a43797cbe7e779f840d2 /src/backend/storage/lmgr/proc.c | |
parent | a6d7e9fb2816fcd23e5d1e95a52448eb9acf7f6e (diff) |
Allow page lock to conflict among parallel group members.
This is required as it is no safer for two related processes to perform
clean up in gin indexes at a time than for unrelated processes to do the
same. After acquiring page locks, we can acquire relation extension lock
but reverse never happens which means these will also not participate in
deadlock. So, avoid checking wait edges from this lock.
Currently, the parallel mode is strictly read-only, but after this patch
we have the infrastructure to allow parallel inserts and parallel copy.
Author: Dilip Kumar, Amit Kapila
Reviewed-by: Amit Kapila, Kuntal Ghosh and Sawada Masahiko
Discussion: https://postgr.es/m/CAD21AoCmT3cFQUN4aVvzy5chw7DuzXrJCbrjTU05B+Ss=Gn1LA@mail.gmail.com
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r-- | src/backend/storage/lmgr/proc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index fa07ddf4f75..9938cddb570 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -1078,12 +1078,12 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) /* * If group locking is in use, locks held by members of my locking group * need to be included in myHeldLocks. This is not required for relation - * extension lock which conflict among group members. However, including - * them in myHeldLocks will give group members the priority to get those - * locks as compared to other backends which are also trying to acquire - * those locks. OTOH, we can avoid giving priority to group members for - * that kind of locks, but there doesn't appear to be a clear advantage of - * the same. + * extension or page locks which conflict among group members. However, + * including them in myHeldLocks will give group members the priority to + * get those locks as compared to other backends which are also trying to + * acquire those locks. OTOH, we can avoid giving priority to group + * members for that kind of locks, but there doesn't appear to be a clear + * advantage of the same. */ if (leader != NULL) { |