How it works...

The pg_controldata utility is a PostgreSQL server application that shows the content of a server's control file. The control file is located within the data directory of a server and is created at database initialization time. Some of the information within it is updated regularly, or when certain major events occur.

The full output of pg_controldata looks like the following (the bold values are those that may change over time as the server runs):

pg_control version number:            942Catalog version number:               201510051Database system identifier:           6320137769675861859Database cluster state:               in productionpg_control last modified:             Thu 01 Sep 2016 08:17:41 PM GMTLatest checkpoint location:           0/19000728Prior checkpoint location: 0/19000648 ...

Get PostgreSQL Administration Cookbook, 9.5/9.6 Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.