PostgreSQL
The database trusted to keep your business data correct, every time.
Official Documentation4
integrations
6
documented sections
Overview
PostgreSQL is an open source relational database known for reliability, depth of features, and strict standards compliance. It has been in active development for over three decades and runs everything from solo projects to systems at global banks, behaving the same on a laptop as it does on managed cloud services.
Version 18, currently at 18.4, introduces an asynchronous I/O subsystem that delivers up to 3x faster reads, a native uuidv7() function for time-ordered identifiers, and virtual generated columns computed at query time. These land as direct speed and simplicity gains for the applications built on top.
The Relational Model
A relational database stores data in tables, like rigorously enforced spreadsheets that know how they connect to each other. Relationships between tables are expressed through foreign keys, normalization removes duplicated data, and joins recombine it at query time. A well-designed schema becomes a precise model of how your business actually works, which is what makes complex questions across related data both answerable and fast.
PostgreSQL 18 adds quality-of-life features at this layer, including uuidv7() for primary keys that sort by creation time and virtual generated columns for derived values that never go stale.
CREATE TABLE orders (
id uuid PRIMARY KEY DEFAULT uuidv7(),
subtotal numeric NOT NULL,
tax numeric NOT NULL,
-- Computed at query time, never stored or stale (new in PostgreSQL 18)
total numeric GENERATED ALWAYS AS (subtotal + tax) VIRTUAL
);Transactions and Integrity
A transaction is an all-or-nothing promise: either every step of an operation succeeds, or none of them happen. That guarantee is what makes it safe to move money between accounts, because no failure can leave the system half-finished. Constraints like foreign keys, unique indexes, and checks are enforced by the database itself, so invalid data cannot be written even by buggy application code, and multiversion concurrency control lets readers and writers proceed without blocking each other. This is why PostgreSQL is the choice for systems where correctness is non-negotiable.
BEGIN;
UPDATE accounts SET balance = balance - 100
WHERE id = 'sender';
UPDATE accounts SET balance = balance + 100
WHERE id = 'receiver';
COMMIT;JSON and Extensibility
Not all data fits neatly into rows and columns, and PostgreSQL handles that too. The jsonb type stores and indexes JSON documents natively, so one database holds both strictly structured records and flexible documents side by side. Beyond JSON, the extension system adds entire capabilities: PostGIS for maps and location data, pgvector for the similarity search behind AI features. Each installs into the database you already run, which means fewer systems to pay for, secure, and keep in sync.
How Devyst Uses PostgreSQL
We use PostgreSQL 18 as the default store for SaaS products where data has clear structure and relationships. Schemas are designed up front with foreign key constraints, so the database enforces integrity rather than trusting application checks alone, and new tables use uuidv7() primary keys for IDs that index efficiently. For AI features that need semantic search, the pgvector extension stores embeddings right beside your relational data. Databases run in Docker locally and on matching managed services in production, so behavior never surprises us between environments.
Indexing and Performance
An index is the difference between flipping to a page from the table of contents and reading the whole book to find it. B-tree indexes serve most lookups, while specialized types like GIN and GiST accelerate JSON, full-text, and geometric queries. The query planner picks execution strategies from table statistics, the explain command reveals its choices, and version 18's asynchronous I/O speeds up the read-heavy workloads dashboards and reports depend on. We profile slow queries with explain before adding indexes, so every index added earns its keep.