Relational database

PostgreSQL

An open-source relational database system with SQL, transactions, constraints, extensibility, and a long-lived ecosystem.

Editorial verdict

Choose PostgreSQL as the default relational system of record when the product needs transactions, constraints, expressive SQL, and a mature ecosystem. Choose another model only when workload semantics—not operational novelty—justify it.12

Best for

  • Transactional application data with relationships and integrity constraints
  • Teams that value standard SQL and broad client, ORM, and hosting support
  • Products that need a portable database foundation across self-managed and managed routes
12

Not ideal for

  • Workloads whose primary model is an embedded local database
  • Systems that require a purpose-built analytics, search, graph, or cache engine as the primary store
  • Teams treating PostgreSQL compatibility as proof that every managed provider behaves identically
1
Main trade-off

PostgreSQL offers a powerful and portable relational foundation, but the team still owns schema design, query performance, indexing, connection behavior, migrations, recovery, and the operational consequences of its hosting model.12

Product boundary

Whether the product's durable system of record should use PostgreSQL semantics and ecosystem rather than a different database model.

PostgreSQL is database software. Hosting, backups, failover, encryption, monitoring, upgrades, connection management, capacity, and support belong to the operator or chosen managed provider.12

For: Application teams whose data benefits from relational modeling, transactions, constraints, and SQL

  • The application requires an embedded or local-first data model.
  • A specialized search, analytics, graph, or cache workload is being mistaken for the primary transactional store.
  • A managed service's compatibility or extension limits do not satisfy the required PostgreSQL workload.

Why teams consider PostgreSQL

  • Relational integrityTransactions, keys, constraints, and SQL support durable application invariants.2
  • Extensible systemPostgreSQL supports extensions and custom types while preserving a relational core.1
  • Deployment choiceThe database can be self-managed or consumed through many managed services.1

Pricing

PostgreSQL uses a permissive open-source license and has no database license fee. Total cost is infrastructure, storage, replicas, backups, transfer, monitoring, support, and database operations.3

Database operation

Open-source software

Estimate the chosen self-managed or managed hosting route; do not describe the absence of a software license fee as zero database cost.3

Software license
PostgreSQL License; no per-core or per-seat database license price3
Primary cost drivers
Compute, storage, replicas, backup and recovery, transfer, monitoring, support, and engineering operations3
Pricing checked View official pricing

PostgreSQL vs alternatives

MySQL

Choose when
Choose it when organizational expertise, compatibility, or a required managed ecosystem favors MySQL.
Compared with PostgreSQL
SQL behavior, extensions, tooling, and operational patterns differ.4

SQLite

Choose when
Choose it for embedded, local-first, or single-file workloads that do not need a client-server database.
Compared with PostgreSQL
Concurrency, deployment, and distributed access constraints are different.5

MongoDB

Choose when
Evaluate it when document-centric modeling and access patterns materially fit better than relational constraints.
Compared with PostgreSQL
Data integrity, joins, transactions, and migration patterns shift to a different model.67

Resources and sources

Official product, architecture, and pricing

  • What is PostgreSQL
    Open
  • PostgreSQL constraints
    Open
  • PostgreSQL license
    Open
  1. 1
    What is PostgreSQL

    PostgreSQL Global Development Group · Accessed Official

  2. 2
    PostgreSQL constraints

    PostgreSQL Global Development Group · Accessed Official

  3. 3
    PostgreSQL license

    PostgreSQL Global Development Group · Accessed Official

  4. 4
    MySQL 8.4 Reference Manual

    Oracle · Accessed Official

  5. 5
    About SQLite

    SQLite · Accessed Official

  6. 6
    Embedded Data in Your MongoDB Schema

    MongoDB · Accessed Official

  7. 7
    Reference Data in Your MongoDB Schema

    MongoDB · Accessed Official