Copy this bookmark:



bookmark detail

PostgreSQL rocks, except when it blocks: Understanding locks
Handy, covers PG locking discussions I normally have with developers :)
One problem I often see users struggle with when it comes to Postgres is locks. While Postgres is amazing at running multiple operations at the same time, there are a few cases in which Postgres needs to block an operation using a lock. You therefore have to be careful about which locks your transactions take, but with the high-level abstractions that PostgreSQL provides, it can be difficult to know exactly what will happen. This post aims to demystify the locking behaviors in Postgres, and to give advice on how to avoid common problems.
postgres  postgresql 
february 2018 by micktwomey
view in context