OnCallReadyStart learning

pg_lsclusters: show information about all PostgreSQL clusters (postgresql-common)

pg_lsclusters [OPTIONS]

What it does

One line per cluster: Ver Cluster Port Status Owner Data-directory Log-file. Status is online, down, or online,recovery for a replica (or a server in recovery).

Options you will use

-h, --no-header
do not print the header line.
-s, --start-conf
add a column with the cluster's start.conf setting (auto, manual, disabled).
-j, --json
output in JSON.

Examples

$ pg_lsclusters

every cluster on the box: port, status, data directory, log

Gotchas

Taught in

On the blog

Try pg_lsclusters in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.