25 points · by luu · 11y ago · 4 comments
The author needs to examine carefully why a value is being updated so many times within a single transaction (first example provided), which by it's own nature is an atomic change (there's no reason to write the middle states to disk as it'll either commit or it won't).
Second the author provides a multiple clients (writers) example. In this case if the ordering is important a LOCK is likely required; however it is more likely that consistency is required (in this case likely the psql specific functions).
I wrote about it, too - http://imperialwicket.com/postgresql-getting-now-in-function...