From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: max_slot_wal_keep_size and wal_keep_segments
Date: Wed, 8 Jul 2020 12:20:31 -0400
Message-ID: <20200708162031.GA1716@alvherre.pgsql> (raw)
In-Reply-To: <6e4f9605-97f3-7eba-f989-4ae41d637d2f@oss.nttdata.com>
On 2020-Jul-09, Fujii Masao wrote:
> I attached the patch that renames wal_keep_segments to wal_keep_size.
Looks good in a quick once-over. Just two small wording comments:
> <para>
> Independently of <varname>max_wal_size</varname>,
> - <xref linkend="guc-wal-keep-segments"/> + 1 most recent WAL files are
> + most recent <xref linkend="guc-wal-keep-size"/> megabytes
> + WAL files plus one WAL file are
> kept at all times. Also, if WAL archiving is used, old segments can not be
> removed or recycled until they are archived. If WAL archiving cannot keep up
> with the pace that WAL is generated, or if <varname>archive_command</varname>
This reads a little strange to me. Maybe "the N most recent megabytes
plus ..."
> /* determine how many segments slots can be kept by slots ... */
> - keepSegs = XLogMBVarToSegs(max_slot_wal_keep_size_mb, wal_segment_size);
> - /* ... and override by wal_keep_segments as needed */
> - keepSegs = Max(keepSegs, wal_keep_segments);
> + slotKeepSegs = XLogMBVarToSegs(max_slot_wal_keep_size_mb, wal_segment_size);
> + /* ... and override by wal_keep_size as needed */
> + keepSegs = XLogMBVarToSegs(wal_keep_size_mb, wal_segment_size);
Since you change the way these two variables are used, I would not say
"override" in the above comment, nor keep the ellipses; perhaps just
change them to "determine how many segments can be kept by slots" and
"ditto for wal_keep_size".
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, masao.fujii@oss.nttdata.com
Subject: Re: max_slot_wal_keep_size and wal_keep_segments
In-Reply-To: <20200708162031.GA1716@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox