Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/config.sgml`
3fca845ae2083782fe71b60d57ae59e55fcce55c04485c650000000100000fa3
<!-- doc/src/sgml/config.sgml -->

<chapter id="runtime-config">
  <title>Server Configuration</title>

  <indexterm>
   <primary>configuration</primary>
   <secondary>of the server</secondary>
  </indexterm>

  <para>
   There are many configuration parameters that affect the behavior of
   the database system. In the first section of this chapter we
   describe how to interact with configuration parameters. The subsequent sections
   discuss each parameter in detail.
  </para>

  <sect1 id="config-setting">
   <title>Setting Parameters</title>

   <sect2 id="config-setting-names-values">
    <title>Parameter Names and Values</title>

    <para>
     All parameter names are case-insensitive. Every parameter takes a
     value of one of five types: boolean, string, integer, floating point,
     or enumerated (enum).  The type determines the syntax for setting the
     parameter:
    </para>

    <itemizedlist>
     <listitem>
      <para>
       <emphasis>Boolean:</emphasis>
       Values can be written as
       <literal>on</literal>,
       <literal>off</literal>,
       <literal>true</literal>,
       <literal>false</literal>,
       <literal>yes</literal>,
       <literal>no</literal>,
       <literal>1</literal>,
       <literal>0</literal>
       (all case-insensitive) or any unambiguous prefix of one of these.
      </para>
     </listitem>

     <listitem>
      <para>
       <emphasis>String:</emphasis>
       In general, enclose the value in single quotes, doubling any single
       quotes within the value.  Quotes can usually be omitted if the value
       is a simple number or identifier, however.
       (Values that match an SQL keyword require quoting in some contexts.)
      </para>
     </listitem>

     <listitem>
      <para>
       <emphasis>Numeric (integer and floating point):</emphasis>
       Numeric parameters can be specified in the customary integer and
       floating-point formats; fractional values are rounded to the nearest
       integer if the parameter is of integer type.  Integer parameters
       additionally accept hexadecimal input (beginning
       with <literal>0x</literal>) and octal input (beginning
       with <literal>0</literal>), but these formats cannot have a fraction.
       Do not use thousands separators.
       Quotes are not required, except for hexadecimal input.
      </para>
     </listitem>

     <listitem>
      <para>
       <emphasis>Numeric with Unit:</emphasis>
       Some numeric parameters have an implicit unit, because they describe
       quantities of memory or time. The unit might be bytes, kilobytes, blocks
       (typically eight kilobytes), milliseconds, seconds, or minutes.
       An unadorned numeric value for one of these settings will use the
       setting's default unit, which can be learned from
       <structname>pg_settings</structname>.<structfield>unit</structfield>.
       For convenience, settings can be given with a unit specified explicitly,
       for example <literal>'120 ms'</literal> for a time value, and they will be
       converted to whatever the parameter's actual unit is.  Note that the
       value must be written as a string (with quotes) to use this feature.
       The unit name is case-sensitive, and there can be whitespace between
       the numeric value and the unit.

       <itemizedlist>
        <listitem>
         <para>
          Valid memory units are <literal>B</literal> (bytes),
          <literal>kB</literal> (kilobytes),
          <literal>MB</literal> (megabytes), <literal>GB</literal>
          (gigabytes), and <literal>TB</literal> (terabytes).
          The multiplier for memory units is 1024, not 1000.
         </para>
        </listitem>

        <listitem>
         <para>
          Valid time units are
          <literal>us</literal> (microseconds),
          <literal>ms</literal> (milliseconds),
          <literal>s</literal> (seconds), <literal>min</literal> (minutes),
          <literal>h</literal> (hours), and

Title: Server Configuration and Parameter Settings
Summary
This section introduces server configuration parameters, describing how to interact with them and detailing each parameter. It explains parameter names, value types (boolean, string, integer, floating point, enum), and syntax for setting them, including units for memory and time.