<!--
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 a <productname>PostgreSQL</productname> database cluster</refpurpose>
 </refnamediv>

 <refsynopsisdiv>
  <cmdsynopsis>
   <command>pg_verify_checksums</command>
   <arg rep="repeat" choice="opt"><replaceable class="parameter">option</replaceable></arg>
   <group choice="opt">
    <group choice="opt">
     <arg choice="plain"><option>-D</option></arg>
     <arg choice="plain"><option>--pgdata</option></arg>
    </group>
    <replaceable class="parameter"> datadir</replaceable>
   </group>
  </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.  The server must be shut
   down cleanly before running <application>pg_verify_checksums</application>.
   The exit status is zero if there are no checksum errors, otherwise nonzero.
  </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>-v</option></term>
      <term><option>--verbose</option></term>
      <listitem>
       <para>
        Enable verbose output. Lists all checked files.
       </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>-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>
</refentry>
