The Backend Engineering Show with Hussein Nasser
The Backend Engineering Show with Hussein Nasser
Hussein Nasser
All Postgres Locks Explained | A Deep Dive
49 minutes Posted Mar 19, 2023 at 12:30 pm.
Intro
What are Locks?
Overview of Postgres Locks
Table-Level Locks
ACCESS EXCLUSIVE
ACCESS SHARE
ROW SHARE
ROW EXCLUSIVE
SHARE UPDATE EXCLUSIVE
SHARE
SHARE ROW EXCLUSIVE
EXCLUSIVE
Table Lock Conflict Matrix
Row-Level Locks
FOR UPDATE
FOR NO KEY UPDATE
FOR SHARE
FOR KEY SHARE
Row Lock Conflict Matrix
Page-Level Locks
Deadlocks
Advistory Locks
Summary
0:00
49:11
Download MP3
Show notes
Get my database engineering course https://database.husseinnasser.com
In this video I do a deep dive in all locks obtained by postgres, I learned a lot while making this video and hope you enjoy it. 
https://www.postgresql.org/docs/current/explicit-locking.html