TIL — “Write Locks” vs “Read Locks” in Postgres

Weiyuan
3 min readMar 2, 2024
source: pixabay, author: jarmoluk

Around 2 months ago before, a coworker approached me: “Hullo, I have an application (with Postgres database) that seems to experience race conditions on one user’s data when the user creates parallel sessions to handle their data at once, how should I prevent that? 😶”

Intuitively, I replied: “Transactions!”

--

--

Weiyuan

Senior Engineering Manager, Ascenda Loyalty | Former Engineering Manager, Grab | Former Director of Engineering, ZilLearn | bit.ly/weiyuan