What is PostgreSQL and why it became the default

Published on 2026-09-12 by frfrand

Why PostgreSQL went from alternative to default relational database: what made it win, what it comes with out of the box, and the two settings worth adjusting on a server.

What is PostgreSQL and why it became the default

Short answer: PostgreSQL is an open-source relational database that went from being "the other one" to the default option because it prioritizes correctness (transactions, constraints, transactional schema changes), can be extended without touching the engine (PostGIS, pgvector, TimescaleDB) and comes with JSONB, ranges and advanced indexes built in. On a real server it is worth adjusting shared_buffers and work_mem, and putting a connection pooler in front when traffic grows.

PostgreSQL started in the eighties in Berkeley as a successor to a project called Ingres. For decades it was "the other one", the serious but less popular alternative than MySQL.

In the last ten years it became the default option for new projects. It is worth seeing why, because the reasons are concrete.

What made it win

Correctness before speed. Postgres always prioritized behaving well in difficult cases: transactions that are truly atomic, constraints that are fulfilled, types that do not accept invalid data. Historically that made it slower in simple tests and much more reliable in production.

An example that illustrates the philosophy: if you try to save a text longer than the column, Postgres gives an error. Other engines, for years, truncated it silently. An error is uncomfortable; a mutilated piece of data that you discover six months later is worse.

Transactional DDL. You can put several schema changes in a transaction and roll them all back if something fails. For migrations this is huge: a partially applied migration is one of the worst possible situations, and with Postgres almost all schema changes are rolled back together. There are few exceptions that cannot go inside a transaction, such as CREATE INDEX CONCURRENTLY or CREATE DATABASE.

Extensible by design. You can add types, functions, and indexes without touching the engine. From there came PostGIS for geographic data, TimescaleDB for time series, pgvector for similarity searches. The same database serves for things that previously required a separate system.

What it brings and many people don't use

JSONB. Stores JSON in binary format, indexable and queryable. It allows starting with a well-defined relational schema and having a couple of flexible columns where needed, without adding a document database to the project.

Arrays and ranges. A column can be a list. Or a date range, with operators to ask if two ranges overlap — perfect for reservations, and resolved without logic in the application.

Indexes for every way of searching. Besides the classic one, there are GIN indexes for JSON and text, partial indexes (which only cover rows that meet a condition and take up much less space), and indexes on expressions.

Materialized views. A heavy query saved as a table and refreshed whenever you say so. It solves many metrics dashboards without adding infrastructure.

The two settings almost nobody touches

Postgres' default configuration is conservative: it's designed to start on any machine, even a very small one. On a real server, two parameters make a big difference:

shared_buffers. How much memory it uses for its cache. The default value is usually 128 MB. The usual recommendation is around 25% of the server's RAM.

work_mem. Memory per sort or group operation. If it's too small, those operations are performed on disk and queries drag. Warning: it multiplies per operation and per connection, so increasing it too much with many connections can exhaust memory.

And the usual diagnosis: put EXPLAIN ANALYZE in front of the slow query. If the first line says Seq Scan on a large table, an index is missing.

A warning about connections

Each connection to Postgres is an operating system process. That makes it very robust (a process that dies doesn't take down the others) and also means connections are expensive.

An application with many workers can exhaust the limit quickly. The solution is not to raise the limit: it's to put a connection pooler in front, like PgBouncer. It's the setting that most often saves an application that "started failing when traffic grew".

In ArduMaker you can install PostgreSQL on your VPS from the panel, as an app: each database has its own minimum-privilege user with a random password and is accessible only from within the VPS, unless you open access from the Internet for a list of IPs (with mandatory TLS). To reach it from another VPS, there is the SSH tunnel between VPS instead of an open port. Data travels in the weekly VPS copy, which is taken hot; for a consistent copy of the database it is advisable to add your own dump (pg_dump or the database manager export).

What changes when PostgreSQL lives on a VPS

PostgreSQL as a technology is the same, but who manages the service changes. If you use a database managed by a provider, part of the operation may be included in the product; if you run it on an ArduMaker VPS, you have greater control over configuration and compatible extensions, in exchange for reviewing maintenance, backups, and security.

Example: a Django API can connect over an internal network to PostgreSQL, run migrations during deployment, and use database users with minimal permissions. Do not open port 5432 to the entire Internet just to connect from your computer: prefer private access or an authorized tunnel.

Frequently asked questions

Is PostgreSQL free? Yes. It is distributed under the PostgreSQL license, an open and permissive license that allows it to be used in commercial products as well.

What is the difference between PostgreSQL and MySQL? Both are relational and serve most projects. PostgreSQL stands out for its data rigor, transactional DDL, advanced types (JSONB, ranges, arrays), and its extension ecosystem; MySQL, for its simplicity and the amount of software that uses it.

How much shared_buffers do I set? Around 25% of RAM is the usual starting point. Then measure: if the server also runs the application, you have to leave memory for it and for the system cache.

When do I need PgBouncer? When the application opens many connections at once (many workers, serverless functions, several servers) and you are approaching max_connections. Increasing that limit is not the solution: each connection is a process.

Related: How to connect to Postgres without exposing it · Supabase explained.

  • PostgreSQL
  • bases de datos
  • SQL
  • backend
  • fundamentos

On ArduMaker

  • PostgreSQL: Install PostgreSQL and manage databases, users and permissions without the command line.

Keep reading

All articles · VPS plans