Using atomic transactions in Postgres to power an idempotent API | Dark Hacker News