Row Lock Roulette
Your view counter is a single Postgres row updated with UPDATE counters SET n = n + 1 WHERE id = 'global'. At about 4,000 increments per second write latency climbs to hundreds of milliseconds and lock wait dominates, while CPU on the box sits at 30 percent. What is happening and what is the standard fix?
Sign in to answer questions and track your progress
Sign In