Comment Comment by koolba This is transaction 101. You simply lock the row via a SELECT … FOR UPDATE when you read the value.Any application that actually cares about consistency of its data must be doing this.Or just do it one step so the update increments the value in place. That way you have an implicit lock. parent koolba 2 years ago
Any application that actually cares about consistency of its data must be doing this.
Or just do it one step so the update increments the value in place. That way you have an implicit lock.