Concepts · Concept

Postgres

“Postgres is a relational database — data lives in structured tables with defined schemas, and you can join across tables, run complex multi-table queries, and get full ACID transaction guarantees: atomic, consistent, isolated, durable operations, even across multiple related writes in one transaction.”

When to reach for it:

Access pattern needs joins or relational modeling (data naturally has multiple related entities you query together)

You need multi-step atomic transactions — e.g., “check availability, decrement inventory, create a booking record” as one all-or-nothing unit (Ticketmaster’s booking flow)

Dataset size doesn’t require horizontal write scale beyond what a well-tuned single instance (+ read replicas for read scaling) can handle

Strong consistency is a hard requirement, not just a nice-to-have

Its weak spot: doesn’t scale horizontally on its own — you have to manually shard it (pick a shard key, build routing logic, handle resharding) if write volume outgrows a single instance.