News for hackers. Stuff that matters.
Re:PostgreSQL anti-patterns: read-modify-write cycles (2014) by glogla on Wednesday December 21, 2016 @04:00AM (#13227760)
Please add [2014].

I should note that this is not Postres specific - any MVCC ACID database will behave this way. Some use locks instead of MVCC and behave differently. But it definitely belongs into "What every programmer should know about transactions, ollected works".

Re:PostgreSQL anti-patterns: read-modify-write cycles (2014) by kornish on Wednesday December 21, 2016 @04:07AM (#13227780)
Sorry, my ability to edit the title expired - but maybe dang can add it.

Yeah, this definitely belongs in the essentials. Lots of developers treat transactions as a race condition panacea. This article is a nice case study about how expressing relative SQL transformations (e.g. "subtract 100 from current value") using absolute values ("set the value to 200"), even absolute values derived from relative application logic, can be prone to fault.

Re:PostgreSQL anti-patterns: read-modify-write cycles (2014) by godmodus on Wednesday December 21, 2016 @05:07AM (#13228003)
id like to read such a collected works :o