~/talk

Anatomy of Table-Level Locks in PostgreSQL

Talkat Berlin Buzzwords 2025 · 2025-06-15..06-17· [databases]
slides:none on file

Explains how PostgreSQL’s MVCC avoids row-level blocking but DDL takes table locks, with access exclusive conflicts everything illustrated by ALTER TABLE DETACH PARTITION blocking selects; recommends concrete tactics: use CREATE INDEX CONCURRENTLY, split ALTERs (add nullable column, batch UPDATE backfill, then SET NOT NULL), add a NOT VALID check constraint then VALIDATE to avoid full rewrites, and set lock_timeout for DDL with retry logic. Introduces pgroll implementing expand/contract multi-schema migrations, trigger-based backfills and easy rollbacks.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 2:27MVCC concept in PostgreSQL
  3. 9:29Why table-level locks exist
  4. 12:37PostgreSQL lock modes explained
  5. 14:00Lock queue and timeouts
  6. 17:35Reducing lock contention techniques
  7. 24:55PostgreSQL improvements over versions
  8. 26:01Introducing PG Roll tool
  9. 34:26PG Roll features and benefits
  10. 35:50Q&A and future plans
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.