On this page

Technology

PostgreSQL

PostgreSQL is an open-source relational database known for reliability and strict data integrity. It is my default for products: accounts, payments, game results, content and analytics live in it

Type
Technology
Official site
postgresql.org
In my work
Projects 1 · Tools 1 · Services 3
Published

What is PostgreSQL and why is it my default database?

A product can change its interface every week, but its data has to survive every release. PostgreSQL gives me transactions, constraints and JSON in one place, so the database itself guards the rules of the product

Key facts

Type
Open-source object-relational database ·
In development
for more than 35 years ·

How I use PostgreSQL

  • Game data. Accounts, matches, leaderboards, achievements, seasons and quiz packs of my multiplayer platform are stored in PostgreSQL; new quiz questions need no new release. Read the case study.
  • This site's CMS. Drafts, published versions, revisions, addresses and media of every page in four languages. A publication is one transaction, so a page never goes live half-written.
  • Safe releases. On production an encrypted backup is taken before every migration. I prefer migrations that only add to the schema, so the previous release can still run.
  • Flexible fields. Settings that differ from one material to another are stored as JSON next to strict columns, which keeps the schema simple without losing checks.

When I choose PostgreSQL and its limits

PostgreSQL is the right default for almost any product with users, money or history. It grows further than most products ever need, and it keeps the data consistent when several requests change it at once.

I reach for something else only for a specific job: memory for short-lived state such as a live game room, a search engine for full-text search at scale, or an analytics warehouse for very large volumes of events.

Used together with

Sources

  1. About PostgreSQL — The PostgreSQL Global Development Group ·

Contact

Have an idea? Let’s make it work