Home Explore Blog CI



postgresql

55th chunk of `doc/src/sgml/config.sgml`
a7e9133ef2a8af99973bcd70258c154ff185add499d1cbc90000000100000fa0

        total time between checkpoints. The default is 0.9, which spreads the
        checkpoint across almost all of the available interval, providing fairly
        consistent I/O load while also leaving some time for checkpoint
        completion overhead.  Reducing this parameter is not recommended because
        it causes the checkpoint to complete faster.  This results in a higher
        rate of I/O during the checkpoint followed by a period of less I/O between
        the checkpoint completion and the next scheduled checkpoint.  This
        parameter can only be set in the <filename>postgresql.conf</filename> file
        or on the server command line.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-checkpoint-flush-after" xreflabel="checkpoint_flush_after">
      <term><varname>checkpoint_flush_after</varname> (<type>integer</type>)
      <indexterm>
       <primary><varname>checkpoint_flush_after</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Whenever more than this amount of data has been
        written while performing a checkpoint, attempt to force the
        OS to issue these writes to the underlying storage.  Doing so will
        limit the amount of dirty data in the kernel's page cache, reducing
        the likelihood of stalls when an <function>fsync</function> is issued at the end of the
        checkpoint, or when the OS writes data back in larger batches in the
        background.  Often that will result in greatly reduced transaction
        latency, but there also are some cases, especially with workloads
        that are bigger than <xref linkend="guc-shared-buffers"/>, but smaller
        than the OS's page cache, where performance might degrade.  This
        setting may have no effect on some platforms.
        If this value is specified without units, it is taken as blocks,
        that is <symbol>BLCKSZ</symbol> bytes, typically 8kB.
        The valid range is
        between <literal>0</literal>, which disables forced writeback,
        and <literal>2MB</literal>.  The default is <literal>256kB</literal> on
        Linux, <literal>0</literal> elsewhere.  (If <symbol>BLCKSZ</symbol> is not
        8kB, the default and maximum values scale proportionally to it.)
        This parameter can only be set in the <filename>postgresql.conf</filename>
        file or on the server command line.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-checkpoint-warning" xreflabel="checkpoint_warning">
      <term><varname>checkpoint_warning</varname> (<type>integer</type>)
      <indexterm>
       <primary><varname>checkpoint_warning</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Write a message to the server log if checkpoints caused by
        the filling of WAL segment files happen closer together
        than this amount of time (which suggests that
        <varname>max_wal_size</varname> ought to be raised).
        If this value is specified without units, it is taken as seconds.
        The default is 30 seconds (<literal>30s</literal>).
        Zero disables the warning.
        No warnings will be generated if <varname>checkpoint_timeout</varname>
        is less than <varname>checkpoint_warning</varname>.
        This parameter can only be set in the <filename>postgresql.conf</filename>
        file or on the server command line.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-max-wal-size" xreflabel="max_wal_size">
      <term><varname>max_wal_size</varname> (<type>integer</type>)
      <indexterm>
       <primary><varname>max_wal_size</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Maximum size to let the WAL grow during automatic
        checkpoints. This is a soft limit; WAL size can exceed
    

Title: Checkpoint Flush After, Checkpoint Warning, and Max WAL Size in PostgreSQL
Summary
This section details PostgreSQL configuration parameters for checkpoint and WAL management. It covers `checkpoint_flush_after` (amount of data written during a checkpoint before forcing OS writes), `checkpoint_warning` (time interval for logging warnings about frequent checkpoints due to WAL segment filling), and introduces `max_wal_size` (maximum WAL size during automatic checkpoints).