All Postgres Locks Explained - A Deep Dive
Offered By: Hussein Nasser via YouTube
Course Description
Overview
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
Related Courses
Designing RESTful APIsUdacity Introduction to NodeJS
Microsoft via edX Exploring GraphQL: A Query Language for APIs
Linux Foundation via edX Build a Google Firebase Web Application
Coursera Project Network via Coursera Build a Twitter Clone Backend
Coursera Project Network via Coursera