PostgreSQL vs SQLite

PostgreSQL

The world's most advanced open-source relational database

SQLite

Embedded serverless database in a single file

Feature PostgreSQL SQLite
Category Databases Databases
Sub-category Relational Relational
Maturity mature mature
Complexity intermediate beginner
Performance tier enterprise grade medium
License PostgreSQL Public Domain
License type permissive permissive
Pricing fully free fully free
GitHub stars 0 0
Contributors 1.5K 50
Commit frequency daily weekly
Plugin ecosystem massive none
Docs quality excellent good
Backing org PostgreSQL Global Dev Group D. Richard Hipp
Funding model community community
Min RAM 256 MB 32 MB
Min CPU cores 1 1
Scaling pattern vertical single_node
Self-hostable Yes Yes
K8s native No No
Offline capable Yes Yes
Vendor lock-in none none
Languages C C
API type SDK REST
Protocols PostgreSQL wire HTTP
Deployment apt, docker, binary docker, apt, binary
SDK languages python, javascript, java, go, rust, ruby, c, php, c#
Team size fit solo, small, medium, enterprise solo, small, medium, enterprise
First release 1996 2020
Latest version

When to use PostgreSQL

  • Primary transactional database for web applications
  • GIS applications with PostGIS extension
  • Time-series data with TimescaleDB extension
  • Vector similarity search with pgvector for RAG
  • JSONB document storage as MongoDB alternative

When to use SQLite

  • Primary use: mobile-database
  • Primary use: embedded-storage
  • Primary use: testing

PostgreSQL anti-patterns

  • Horizontal sharding not native (need Citus)
  • Not ideal for pure key-value workloads at massive scale
  • Write-heavy append-only workloads better served by Cassandra
  • Not a graph database

SQLite anti-patterns

Full PostgreSQL profile → Full SQLite profile → All comparisons