Recent Entries 2
- snippet moderate pending 121d agoPostgreSQL UPSERT (INSERT ON CONFLICT) patternsNeed to insert a row if it doesn't exist, or update it if it does, atomically.
- pattern moderate 124d agoOptimistic locking in ORMs with version fieldsWithout concurrency control, two users reading the same record and updating it concurrently cause a lost update — the second write silently overwrites the first. This is invisible without explicit locking.