Re: patch to allow disable of WAL recycling
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Jerry Jelinek <jerry.jelinek@joyent.com>
Cc: pgsql-hackers@postgresql.org
Date: 2018-07-05T21:39:10Z
Lists: 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
Commits
-
Add wal_recycle and wal_init_zero GUCs.
- 475861b2615d 12.0 landed
-
Add GUC and storage parameter to set the maximum size of GIN pending list.
- a1b395b6a26a 9.5.0 cited