pgsql: Add assert to ensure that page locks don't participate in deadlo - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Add assert to ensure that page locks don't participate in deadlo
Date
Msg-id E1jElJA-00042D-A5@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Add assert to ensure that page locks don't participate in deadlock cycle.

Assert that we don't acquire any other heavyweight lock while holding the
page lock except for relation extension.  However, these locks are never
taken in reverse order which implies that page locks will never
participate in the deadlock cycle.

Similar to relation extension, page locks are also held for a short
duration, so imposing such a restriction won't hurt.

Author: Dilip Kumar, with few changes by Amit Kapila
Reviewed-by: Amit Kapila, Kuntal Ghosh and Sawada Masahiko
Discussion: https://postgr.es/m/CAD21AoCmT3cFQUN4aVvzy5chw7DuzXrJCbrjTU05B+Ss=Gn1LA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/72e78d831ab5550c39f2dcc7cc5d44c406ec3dc2

Modified Files
--------------
src/backend/storage/lmgr/lock.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: nbtree: Use raw PageAddItem() for retail inserts.
Next
From: Fujii Masao
Date:
Subject: pgsql: Rename the recovery-related wait events.