Zettify

Article

  • Data & Databases
  • Engineering
  • Cloud & AWS

Why we still reach for Postgres first

Boring, relational and fast enough for almost every business system we build. Here is when we pick it, and the few times we don't.

Zettify Engineering · · 1 min read

Most business data is relational: customers place orders, orders hold items, items come from suppliers. Pretending otherwise to save a schema decision on day one costs far more on day three hundred.

Boring is a feature

PostgreSQL has been in production for decades. Its failure modes are documented, its tooling is mature, and every managed cloud runs it. When a client's team takes the system over, they can hire for it.

  • Transactions that keep money and stock consistent
  • Constraints that reject bad data before it spreads
  • Managed options such as Amazon RDS for backups and failover

One database, many shapes

The flexible parts fit too. A jsonb column holds the settings that differ per customer, full-text search covers the first version of a search box, and a queue table carries background jobs until volume says otherwise.

select id, settings->>'locale' as locale
from customers
where settings @> '{"newsletter": true}';

When we pick something else

Some workloads do outgrow it: very high-volume event streams, global low-latency key lookups, or analytics across billions of rows. We add a specialised store next to Postgres for that one job, and keep the business records where they are.

Start with the database you can reason about at 2 a.m., and add the clever one when the numbers ask for it.