---
title: "Discussion on \"You Probably Don’t Need a Lock: 3 Ways to Fix the Lost Update in PostgreSQL\" | Hashnode"
description: "Discussion on \"You Probably Don’t Need a Lock: 3 Ways to Fix the Lost Update in PostgreSQL\". A two-terminal demo you can run in five minutes, and how to explain it in an interview.\nTwo customers click “Buy” on the last item in stock at the same moment. Both orders are accepted. You are now on"
url: "https://hashnode.com/posts/you-probably-don-t-need-a-lock-3-ways-to-fix-the-lost-update-in-postgresql/6afee12ba9d45c13a4b1f9fa"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [You Probably Don’t Need a Lock: 3 Ways to Fix the Lost Update in PostgreSQL](https://scaledojo-engineering.hashnode.dev/you-probably-don-t-need-a-lock-3-ways-to-fix-the-lost-update-in-postgresql?utm_source=hashnode&utm_medium=feed)

A two-terminal demo you can run in five minutes, and how to explain it in an interview. Two customers click “Buy” on the last item in stock at the same moment. Both orders are accepted. You are now on

Nov 19 · 7 min read · scaledojo-engineering.hashnode.dev  
Read the article

## Written by

[ScaleDojo](https://hashnode.com/@scaledojo)

@scaledojo

  
[View profile](https://hashnode.com/@scaledojo)

## Responses 2

Markdown supported · ⌘↵ to post

[DEADLINE FIGHTER'S](https://hashnode.com/@mrspidy)

[Nov 19](https://hashnode.com/posts/you-probably-don-t-need-a-lock-3-ways-to-fix-the-lost-update-in-postgresql/6afee12ba9d45c13a4b1f9fa/comment/6aff0ad1c2cbe8a06874e68e)

Great information 👏🏻

[Roshan Gupta](https://hashnode.com/@roshandec)

[Nov 19](https://hashnode.com/posts/you-probably-don-t-need-a-lock-3-ways-to-fix-the-lost-update-in-postgresql/6afee12ba9d45c13a4b1f9fa/comment/6aff05cbbcde9ba97fd9398f)

It's well written 👏
