Re: patch to allow disable of WAL recycling - Mailing list pgsql-hackers

From Andres Freund
Subject Re: patch to allow disable of WAL recycling
Date
Msg-id 20180705213910.lextkj7tv23rcxvb@alap3.anarazel.de
Whole thread Raw
In response to patch to allow disable of WAL recycling  (Jerry Jelinek <jerry.jelinek@joyent.com>)
Responses Re: patch to allow disable of WAL recycling  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

On 2018-06-26 07:35:57 -0600, Jerry Jelinek wrote:
> +     <varlistentry id="guc-wal-recycle" xreflabel="wal_recycle">
> +      <term><varname>wal_recycle</varname> (<type>boolean</type>)
> +      <indexterm>
> +       <primary><varname>wal_recycle</varname> configuration parameter</primary>
> +      </indexterm>
> +      </term>
> +      <listitem>
> +       <para>
> +        When this parameter is <literal>on</literal>, past log file segments
> +        in the <filename>pg_wal</filename> directory are recycled for future
> +        use.
> +       </para>
> +
> +       <para>
> +        Turning this parameter off causes past log files segments to be deleted
> +        when no longer needed. This can improve performance by eliminating
> +        read-modify-write operations on old files which are no longer in the
> +        filesystem cache.
> +       </para>
> +      </listitem>
> +     </varlistentry>

This is formulated *WAY* too positive. It'll have dramatic *NEGATIVE*
performance impact of non COW filesystems, and very likely even negative
impacts in a number of COWed scenarios (when there's enough memory to
keep all WAL files in memory).

I still think that fixing this another way would be preferrable. This'll
be too much of a magic knob that depends on the fs, hardware and
workload.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: make installcheck-world in a clean environment
Next
From: Alvaro Herrera
Date:
Subject: Re: documentation fixes for partition pruning, round three