Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/vacuumlo.sgml`
3f1c6b4c723b2e6028aa956d01545d498a5f4793b0eb899d0000000100000cf2
 class="parameter">port</replaceable></option></term>
    <listitem>
     <para>Database server's port.</para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><option>-U <replaceable>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>vacuumlo</application> to prompt for a
      password before connecting to a database.
     </para>

     <para>
      This option is never essential, since
      <application>vacuumlo</application> will automatically prompt
      for a password if the server demands password authentication.
      However, <application>vacuumlo</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>
  </variablelist>
  </para>
 </refsect1>

 <refsect1>
  <title>Environment</title>

  <variablelist>
   <varlistentry>
    <term><envar>PGHOST</envar></term>
    <term><envar>PGPORT</envar></term>
    <term><envar>PGUSER</envar></term>

    <listitem>
     <para>
      Default connection parameters.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>

  <para>
   This utility, like most other <productname>PostgreSQL</productname> utilities,
   also uses the environment variables supported by <application>libpq</application>
   (see <xref linkend="libpq-envars"/>).
  </para>

  <para>
   The environment variable <envar>PG_COLOR</envar> specifies whether to use
   color in diagnostic messages. Possible values are
   <literal>always</literal>, <literal>auto</literal> and
   <literal>never</literal>.
  </para>
 </refsect1>

 <refsect1>
  <title>Notes</title>

  <para>
   <application>vacuumlo</application> works by the following method:
   First, <application>vacuumlo</application> builds a temporary table which contains all
   of the OIDs of the large objects in the selected database.  It then scans
   through all columns in the database that are of type
   <type>oid</type> or <type>lo</type>, and removes matching entries from the temporary
   table.  (Note: Only types with these names are considered; in particular,
   domains over them are not considered.)  The remaining entries in the
   temporary table identify orphaned LOs.  These are removed.
  </para>
 </refsect1>

 <refsect1>
  <title>Author</title>

  <para>
   Peter Mount <email>peter@retep.org.uk</email>
  </para>
 </refsect1>

</refentry>

Title: vacuumlo Utility: Connection Parameters and Environment Variables
Summary
This section details the connection parameters and environment variables for the vacuumlo utility in PostgreSQL. It covers options for specifying the database server's port, username for connection, and password handling. The --no-password option prevents password prompts, while --password forces a prompt. Environment variables like PGHOST, PGPORT, and PGUSER can set default connection parameters. The utility also uses libpq environment variables and PG_COLOR for diagnostic message coloring. The document explains vacuumlo's method of identifying and removing orphaned large objects by building a temporary table of OIDs and scanning database columns. The utility was authored by Peter Mount.