1<!--
2doc/src/sgml/ref/pg_controldata.sgml
3PostgreSQL documentation
4-->
5
6<refentry id="app-pgcontroldata">
7 <indexterm zone="app-pgcontroldata">
8  <primary>pg_controldata</primary>
9 </indexterm>
10
11 <refmeta>
12  <refentrytitle><application>pg_controldata</application></refentrytitle>
13  <manvolnum>1</manvolnum>
14  <refmiscinfo>Application</refmiscinfo>
15 </refmeta>
16
17 <refnamediv>
18  <refname>pg_controldata</refname>
19  <refpurpose>display control information of a <productname>PostgreSQL</productname> database cluster</refpurpose>
20 </refnamediv>
21
22 <refsynopsisdiv>
23  <cmdsynopsis>
24   <command>pg_controldata</command>
25   <arg choice="opt"><replaceable class="parameter">option</replaceable></arg>
26   <group choice="opt">
27    <group choice="opt">
28     <arg choice="plain"><option>-D</option></arg>
29     <arg choice="plain"><option>--pgdata</option></arg>
30    </group>
31    <replaceable class="parameter">datadir</replaceable>
32   </group>
33  </cmdsynopsis>
34 </refsynopsisdiv>
35
36 <refsect1 id="r1-app-pgcontroldata-1">
37  <title>Description</title>
38  <para>
39   <command>pg_controldata</command> prints information initialized during
40   <command>initdb</command>, such as the catalog version.
41   It also shows information about write-ahead logging and checkpoint
42   processing.  This information is cluster-wide, and not specific to any one
43   database.
44  </para>
45
46  <para>
47   This utility can only be run by the user who initialized the cluster because
48   it requires read access to the data directory.
49   You can specify the data directory on the command line, or use
50   the environment variable <envar>PGDATA</envar>.  This utility supports the options
51   <option>-V</option> and <option>--version</option>, which print the
52   <application>pg_controldata</application> version and exit.  It also
53   supports options <option>-?</option> and <option>--help</option>, which output the
54   supported arguments.
55  </para>
56 </refsect1>
57
58 <refsect1>
59  <title>Environment</title>
60
61  <variablelist>
62   <varlistentry>
63    <term><envar>PGDATA</envar></term>
64
65    <listitem>
66     <para>
67      Default data directory location
68     </para>
69    </listitem>
70   </varlistentry>
71
72   <varlistentry>
73    <term><envar>PG_COLOR</envar></term>
74    <listitem>
75     <para>
76      Specifies whether to use color in diagnostic messages. Possible values
77      are <literal>always</literal>, <literal>auto</literal> and
78      <literal>never</literal>.
79     </para>
80    </listitem>
81   </varlistentry>
82  </variablelist>
83 </refsect1>
84</refentry>
85