Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/clusterdb.sgml`
03816592344bd92c4863898040fbc75814f2bb562ee65ecd000000010000094c
 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 <replaceable class="parameter">username</replaceable></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>clusterdb</application> to prompt for a
        password before connecting to a database.
       </para>

       <para>
        This option is never essential, since
        <application>clusterdb</application> will automatically prompt
        for a password if the server demands password authentication.
        However, <application>clusterdb</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>
        When the <option>-a</option>/<option>--all</option> is used, connect
        to this database to gather the list of databases to cluster.
        If not specified, the <literal>postgres</literal> database will be used,
        or if that does not exist, <literal>template1</literal>

Title: clusterdb Connection Options: Authentication and Database Selection
Summary
This section details `clusterdb` connection options including specifying the port, username, password prompting behavior (`-w` and `-W`), and the maintenance database to connect to when using the `-a` or `--all` option.