Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Dive deep into the world of PostgreSQL locks with this comprehensive 48-minute video tutorial. Explore the fundamentals of database locking mechanisms, starting with an introduction to the concept and its importance in database management. Gain a thorough understanding of various lock types in PostgreSQL, including table-level, row-level, and page-level locks. Learn about specific lock modes such as ACCESS EXCLUSIVE, ACCESS SHARE, ROW SHARE, and FOR UPDATE, along with their applications and potential conflicts. Examine lock conflict matrices to understand how different lock types interact. Delve into advanced topics like deadlocks and advisory locks. Conclude with a summary of key concepts, equipping you with essential knowledge to optimize database performance and concurrency in PostgreSQL systems.
Syllabus
Intro
What are Locks?
Overview of Postgres Locks
Table-Level Locks
ACCESS EXCLUSIVE
ACCESS SHARE
19:00 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
34:40 FOR KEY SHARE Row Lock Conflict Matrix
Page-Level Locks
Deadlocks
Advisory Locks
Summary
Taught by
Hussein Nasser