<!--
doc/src/sgml/ref/pg_verify_checksums.sgml
PostgreSQL documentation
-->

<refentry id="pgverifychecksums">
 <indexterm zone="pgverifychecksums">
  <primary>pg_verify_checksums</primary>
 </indexterm>

 <refmeta>
  <refentrytitle><application>pg_verify_checksums</application></refentrytitle>
  <manvolnum>1</manvolnum>
  <refmiscinfo>Application</refmiscinfo>
 </refmeta>

 <refnamediv>
  <refname>pg_verify_checksums</refname>
  <refpurpose>verify data checksums in an offline <productname>PostgreSQL</productname> database cluster</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pg_verify_checksums</command>
   <arg choice="opt"><replaceable class="parameter">option</replaceable></arg>
   <arg choice="opt"><arg choice="opt"><option>-D</option></arg><arg choice="opt"><option>--pgdata</option></arg> <replaceable class="parameter">datadir</replaceable></arg>
  </cmdsynopsis>
 </refsynopsisdiv>

 <refsect1 id="r1-app-pg_verify_checksums-1">
  <title>Description</title>
  <para>
   <command>pg_verify_checksums</command> verifies data checksums in a
   <productname>PostgreSQL</productname> cluster.
  </para>
 </refsect1>

 <refsect1>
  <title>Options</title>

   <para>
    The following command-line options are available:

    <variablelist>

     <varlistentry>
      <term><option>-D <replaceable>directory</replaceable></option></term>
      <term><option>--pgdata=<replaceable>directory</replaceable></option></term>
      <listitem>
       <para>
        Specifies the directory where the database cluster is stored.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-r <replaceable>relfilenode</replaceable></option></term>
      <listitem>
       <para>
        Only validate checksums in the relation with specified relfilenode.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-d</option></term>
      <listitem>
       <para>
        Enable debug output. Lists all checked blocks and their checksum.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-V</option></term>
       <term><option>--version</option></term>
       <listitem>
       <para>
       Print the <application>pg_verify_checksums</application> version and exit.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-?</option></term>
      <term><option>--help</option></term>
       <listitem>
        <para>
         Show help about <application>pg_verify_checksums</application> command line
         arguments, and exit.
        </para>
       </listitem>
      </varlistentry>
    </variablelist>
   </para>
 </refsect1>

 <refsect1>
  <title>Environment</title>

  <variablelist>
   <varlistentry>
    <term><envar>PGDATA</envar></term>

    <listitem>
     <para>
      Specifies the directory where the database cluster is 
      stored; can be overridden using the <option>-D</option> option.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </refsect1>

 <refsect1>
  <title>Notes</title>
  <para>
   The cluster must be shut down cleanly before running
   <application>pg_verify_checksums</application>.
  </para>
 </refsect1>

</refentry>
