OnCallReadyStart learning

pg_controldata: display control information of a PostgreSQL database cluster

pg_controldata [OPTION] [DATADIR]

What it does

Prints what pg_control holds: the cluster state (in production, shut down, in archive recovery), the latest checkpoint location and its REDO, the timeline, the system identifier, data checksum version. Works while the server is down - useful after a crash.

Examples

$ sudo -u postgres /usr/lib/postgresql/18/bin/pg_controldata /var/lib/postgresql/18/main

state, checkpoint, timeline

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