Allow relation extension lock to conflict among parallel group members.
authorAmit Kapila <akapila@postgresql.org>
Fri, 20 Mar 2020 02:50:56 +0000 (08:20 +0530)
committerAmit Kapila <akapila@postgresql.org>
Fri, 20 Mar 2020 02:50:56 +0000 (08:20 +0530)
commit85f6b49c2c53fb1e08d918ec9305faac13cf7ad6
tree72007fac1932d51757c964c5e064aba9c04c04a4
parentb27e1b3418b189e1a5aee13cbd09bff94f010a86
Allow relation extension lock to conflict among parallel group members.

This is required as it is no safer for two related processes to extend the
same relation at a time than for unrelated processes to do the same.  We
don't acquire a heavyweight lock on any other object after relation
extension lock which means such a lock can never participate in the
deadlock cycle.  So, avoid checking wait edges from this lock.

This provides an infrastructure to allow parallel operations like insert,
copy, etc. which were earlier not possible as parallel group members won't
conflict for relation extension lock.

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
src/backend/storage/lmgr/deadlock.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/proc.c
src/include/storage/lock.h