Home Explore Blog CI



postgresql

6th chunk of `doc/src/sgml/ref/pg_amcheck.sgml`
ad6fc606f97c9ae6ff4359897ef51c6ba5363bcef53235670000000100000fa0
 option.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--heapallindexed</option></term>
     <listitem>
      <para>
       For each index checked, verify the presence of all heap tuples as index
       tuples in the index using <xref linkend="amcheck"/>'s
       <option>heapallindexed</option> option.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--parent-check</option></term>
     <listitem>
      <para>
       For each btree index checked, use <xref linkend="amcheck"/>'s
       <function>bt_index_parent_check</function> function, which performs
       additional checks of parent/child relationships during index checking.
      </para>
      <para>
       The default is to use <application>amcheck</application>'s
       <function>bt_index_check</function> function, but note that use of the
       <option>--rootdescend</option> option implicitly selects
       <function>bt_index_parent_check</function>.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--rootdescend</option></term>
     <listitem>
      <para>
       For each index checked, re-find tuples on the leaf level by performing a
       new search from the root page for each tuple using
       <xref linkend="amcheck"/>'s <option>rootdescend</option> option.
      </para>
      <para>
       Use of this option implicitly also selects the
       <option>--parent-check</option> option.
      </para>
      <para>
       This form of verification was originally written to help in the
       development of btree index features.  It may be of limited use or even
       of no use in helping detect the kinds of corruption that occur in
       practice.  It may also cause corruption checking to take considerably
       longer and consume considerably more resources on the server.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>

  <warning>
   <para>
    The extra checks performed against B-tree indexes when the
    <option>--parent-check</option> option or the
    <option>--rootdescend</option> option is specified require
    relatively strong relation-level locks.  These checks are the only
    checks that will block concurrent data modification from
    <command>INSERT</command>, <command>UPDATE</command>, and
    <command>DELETE</command> commands.
   </para>
  </warning>

  <para>
   The following command-line options control the connection to the server:

   <variablelist>
    <varlistentry>
     <term><option>-h <replaceable class="parameter">hostname</replaceable></option></term>
     <term><option>--host=<replaceable class="parameter">hostname</replaceable></option></term>
     <listitem>
      <para>
       Specifies the host name of the machine on which the server is running.
       If the value begins with a slash, it is used as the directory for the
       Unix domain socket.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
     <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
     <listitem>
      <para>
       Specifies the TCP port or local Unix domain socket file extension on
       which the server is listening for connections.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-U</option></term>
     <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
     <listitem>
      <para>
       User name to connect as.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-w</option></term>
     <term><option>--no-password</option></term>
     <listitem>
      <para>
       Never issue a password prompt.  If the server requires password
       authentication and a password is not available by other means such as
       a <filename>.pgpass</filename>

Title: pg_amcheck Options: B-tree Index Checks and Server Connection Options
Summary
This section describes additional options for B-tree index checks, including verifying heap tuple presence (--heapallindexed) and parent/child relationships (--parent-check), as well as performing a new search from the root page for each tuple (--rootdescend). It also covers server connection options such as specifying the hostname (-h/--host), port (-p/--port), username (-U/--username), and password prompt behavior (-w/--no-password).