sudo pg_createcluster 16 mycluster --start

Category: Databases & SQL

sudo pg_createcluster 16 mycluster --start

Create a new PostgreSQL cluster and start it

Creates a fresh cluster, meaning its own postmaster, data directory under /var/lib/postgresql/16, and set of databases, then boots it with --start. It takes the next free port, normally 5433, because main owns 5432. Handy for an isolated test instance; pg_dropcluster removes it.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.