Home Explore Blog CI



postgresql

7th chunk of `doc/src/sgml/ref/pg_amcheck.sgml`
23050fbf8f690d2366629a3d795611646ba5590371d874180000000100000d19
    <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> file, the connection attempt will fail.
       This option can be useful in batch jobs and scripts where no user is
       present to enter a password.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-W</option></term>
     <term><option>--password</option></term>
     <listitem>
      <para>
       Force <application>pg_amcheck</application> to prompt for a password
       before connecting to a database.
      </para>
      <para>
       This option is never essential, since
       <application>pg_amcheck</application> will automatically prompt for a
       password if the server demands password authentication.  However,
       <application>pg_amcheck</application> will waste a connection attempt
       finding out that the server wants a password.  In some cases it is
       worth typing <option>-W</option> to avoid the extra connection attempt.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>--maintenance-db=<replaceable class="parameter">dbname</replaceable></option></term>
     <listitem>
      <para>
       Specifies a database or
       <link linkend="libpq-connstring">connection string</link> to be
       used to discover the list of databases to be checked. If neither
       <option>--all</option> nor any option including a database pattern is
       used, no such connection is required and this option does nothing.
       Otherwise, any connection string parameters other than
       the database name which are included in the value for this option
       will also be used when connecting to the databases
       being checked. If this option is omitted, the default is
       <literal>postgres</literal> or, if that fails,
       <literal>template1</literal>.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>

  <para>
   Other options are also available:

   <variablelist>
    <varlistentry>
     <term><option>-e</option></term>
     <term><option>--echo</option></term>
     <listitem>
      <para>
      Echo to stdout all SQL sent to the server.
      </para>
     </listitem>
    </varlistentry>

    <varlistentry>
     <term><option>-j <replaceable class="parameter">num</replaceable></option></term>
     <term><option>--jobs=<replaceable class="parameter">num</replaceable></option></term>

Title: pg_amcheck Options: Connection and Miscellaneous Options
Summary
This section details the remaining connection options for pg_amcheck, including specifying the port (-p/--port), username (-U/--username), password prompt behavior (-w/--no-password, -W/--password), and the maintenance database (--maintenance-db). It also covers other options such as echoing SQL commands (-e/--echo) and setting the number of parallel jobs (-j/--jobs).