Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I had a read-then-write bug in an app: read a balance, do the arithmetic in the application, write it back, log the previous value. Classic lost update. I knew it was there in theory. Every time I reproduced it locally I got a different answer though, somewhere between four and six lost writes out of ten, and that’s exactly the kind of flaky result that makes you shrug and move on.
Running it against a DigitalOcean Managed PostgreSQL cluster is what pinned it down. On the direct connection it behaved much as it did locally. Through the PgBouncer connection pool it became consistent: same shape every run, and the failure was obvious rather than intermittent.
Below are the numbers from all three environments, why the pool turns this particular bug from flaky to reproducible, and the Postgres 18 syntax that fixed it in a single statement. Everything came off a real cluster I created for the test and destroyed afterwards.
Aakash Singh
Aakash Singh
Frank Tufano
fullammo
4ae272398ee6445a9bf73f4cd632b5
eddie
Taha Aziz Ben Ali
Telmo Valverde
Alexandre Herlinvaux
52d4eff26a544eefb189e2005836b2
EatingAquamarineScubaDiver