SELECT FOR UPDATE and Row-Locking Patterns in PostgreSQL

`SELECT ... FOR UPDATE` is the workhorse of correct concurrent writes in PostgreSQL.