Home Explore Blog CI



postgresql

5th chunk of `doc/src/sgml/ref/postgres-ref.sgml`
e836bba953fb9947f5fa3a6faf792ac6943f1f02cc36d56b0000000100000fa1
 Defaults to the value of the <envar>PGPORT</envar> environment
        variable, or if <envar>PGPORT</envar> is not set, then
        defaults to the value established during compilation (normally
        5432).  If you specify a port other than the default port,
        then all client applications must specify the same port using
        either command-line options or <envar>PGPORT</envar>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-s</option></term>
      <listitem>
       <para>
        Print time information and other statistics at the end of each command.
        This is useful for benchmarking or for use in tuning the number of
        buffers.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-S</option> <replaceable class="parameter">work-mem</replaceable></term>
      <listitem>
       <para>
        Specifies the base amount of memory to be used by sorts and
        hash tables before resorting to temporary disk files.  See the
        description of the <varname>work_mem</varname> configuration
        parameter in <xref linkend="runtime-config-resource-memory"/>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-V</option></term>
      <term><option>--version</option></term>
      <listitem>
       <para>
        Print the <application>postgres</application> version and exit.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--<replaceable>name</replaceable>=<replaceable>value</replaceable></option></term>
      <listitem>
       <para>
        Sets a named run-time parameter; a shorter form of
        <option>-c</option>.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>--describe-config</option></term>
      <listitem>
       <para>
        This option dumps out the server's internal configuration variables,
        descriptions, and defaults in tab-delimited <command>COPY</command> format.
        It is designed primarily for use by administration tools.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-?</option></term>
      <term><option>--help</option></term>
      <listitem>
       <para>
        Show help about <application>postgres</application> command line
        arguments, and exit.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </refsect2>

   <refsect2>
    <title>Semi-Internal Options</title>

    <para>
     The options described here are used
     mainly for debugging purposes, and in some cases to assist with
     recovery of severely damaged databases. There should be no reason
     to use them in a production database setup.  They are listed
     here only for use by <productname>PostgreSQL</productname>
     system developers.  Furthermore, these options might
     change or be removed in a future release without notice.
    </para>

    <variablelist>
     <varlistentry>
      <term><option>-f</option> <literal>{ s | i | o | b | t | n | m | h }</literal></term>
      <listitem>
       <para>
        Forbids the use of particular scan and join methods:
        <literal>s</literal> and <literal>i</literal>
        disable sequential and index scans respectively,
        <literal>o</literal>, <literal>b</literal> and <literal>t</literal>
        disable index-only scans, bitmap index scans, and TID scans
        respectively, while
        <literal>n</literal>, <literal>m</literal>, and <literal>h</literal>
        disable nested-loop, merge and hash joins respectively.
       </para>

       <para>
        Neither sequential scans nor nested-loop joins can be disabled
        completely; the <literal>-fs</literal> and
        <literal>-fn</literal> options simply discourage the optimizer
        from using those plan types if it has any other alternative.
       </para>
      </listitem>

Title: Postgres Options: Work Memory, Version, Runtime Parameters, and Debugging
Summary
This section details more command line options for the `postgres` command, including specifying work memory size, printing the version, setting runtime parameters, describing the configuration, and displaying help. It also describes semi-internal options used mainly for debugging and recovery, which should not be used in production.