The guide lists the lowest hardware and OS specifications you need to install and run PostgreSQL reliably in development and small-scale production.
PostgreSQL will start on almost any modern computer, but stability demands at least 2 CPU cores, 2 GB RAM, and 10 GB free, high-speed disk. These specs let the postmaster launch, run basic SQL, and keep WAL cycling safely.
Allocate 2 GB RAM for operating system + PostgreSQL. Linux needs ~512 MB, leaving 1.5 GB for shared_buffers, work_mem, and maintenance_work_mem.For production, jump to 4 GB so autovacuum and simple joins never swap.
Yes. PostgreSQL forks one process per connection. A dual-core (2 vCPU) chip prevents the OS and background workers from competing with user queries. Single-core systems boot, but concurrent queries stall.
Reserve 10 GB on SSD or NVMe. The data directory grows rapidly from WAL and temporary files. SSD latency <1 ms keeps checkpoints under control.On magnetic disks, increase checkpoint_timeout to 30 min to lower write spikes.
PostgreSQL 15+ supports 64-bit Linux (kernel 3.10+), macOS 10.15+, and Windows 10/Server 2019+. Use ext4 or xfs on Linux, APFS on macOS, NTFS on Windows. 32-bit OSes lack address space for shared memory.
Yes, but grant the container the same 2 vCPU/2 GB RAM limits and mount a persistent SSD volume for $PGDATA
.Disable swap inside containers to avoid sudden OOM kills.
Run lscpu
, free -h
, and df -h /var/lib/postgresql
(Linux) or equivalents.Compare results to the 2 vCPU/2 GB/10 GB baseline before initializing the cluster with initdb
.
random_page_cost = 1.1
Keep extensions minimal, turn on log_autovacuum_min_duration, and schedule nightly VACUUM FULL
only during low traffic. Monitor pg_stat_database.blks_read
to detect I/O saturation early.
.
No. Newer releases compile, but limited address space prevents allocating shared memory efficiently. Use 64-bit OS for production.
Yes, PostgreSQL can run with 512 MB, but you must lower shared_buffers to 64 MB and keep active connections under 5. Performance will be poor.
Keep a small (1 GB) swap file to avoid OOM kills, but monitor vm.swappiness
and PostgreSQL's own memory to prevent heavy swapping.