pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: David Steele <david@pgmasters.net>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: alvherre@2ndquadrant.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: max_slot_wal_keep_size and wal_keep_segments
Date: Mon, 20 Jul 2020 19:02:50 +0900
Message-ID: <6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com> (raw)
In-Reply-To: <dc4768f2-1eff-d2fc-35ba-6b2985b7cb6c@oss.nttdata.com>
References: <6e4f9605-97f3-7eba-f989-4ae41d637d2f@oss.nttdata.com>
	<20200709.134743.1136524996274963021.horikyota.ntt@gmail.com>
	<866c681c-3082-7010-cc9e-bf3b9483c991@oss.nttdata.com>
	<20200713.160111.1304073320526166244.horikyota.ntt@gmail.com>
	<d8d60d1a-5233-cbcc-099d-ee34033ea619@oss.nttdata.com>
	<87269252-772e-2daf-9955-674a24e24de6@pgmasters.net>
	<efffe8f2-63ea-fe8c-68db-244aa27a63ef@oss.nttdata.com>
	<6479e9a4-0a9d-0772-0401-2c5d0de03ea7@pgmasters.net>
	<dc4768f2-1eff-d2fc-35ba-6b2985b7cb6c@oss.nttdata.com>



On 2020/07/20 13:48, Fujii Masao wrote:
> 
> 
> On 2020/07/17 20:24, David Steele wrote:
>>
>> On 7/17/20 5:11 AM, Fujii Masao wrote:
>>>
>>>
>>> On 2020/07/14 20:30, David Steele wrote:
>>>> On 7/14/20 12:00 AM, Fujii Masao wrote:
>>>>>
>>>>> The patch was no longer applied cleanly because of recent commit.
>>>>> So I updated the patch. Attached.
>>>>>
>>>>> Barring any objection, I will commit this patch.
>>>>
>>>> This doesn't look right:
>>>>
>>>> +   the <xref linkend="guc-wal-keep-size"/> most recent megabytes
>>>> +   WAL files plus one WAL file are
>>>>
>>>> How about:
>>>>
>>>> +   <xref linkend="guc-wal-keep-size"/> megabytes of
>>>> +   WAL files plus one WAL file are
>>>
>>> Thanks for the comment! Isn't it better to keep "most recent" part?
>>> If so, what about either of the followings?
>>>
>>> 1. <xref linkend="guc-wal-keep-size"/> megabytes of WAL files plus
>>>      one WAL file that were most recently generated are kept all time.
>>>
>>> 2. <xref linkend="guc-wal-keep-size"/> megabytes + <xref linkend="guc-wal-segment-size"> bytes
>>>      of WAL files that were most recently generated are kept all time.
>>
>> "most recent" seemed implied to me, but I see your point.
>>
>> How about:
>>
>> +   the most recent <xref linkend="guc-wal-keep-size"/> megabytes of
>> +   WAL files plus one additional WAL file are
> 
> I adopted this and pushed the patch. Thanks!
> 
> Also we need to update the release note for v13. What about adding the following?
> 
> ------------------------------------
> Rename configuration parameter wal_keep_segments to wal_keep_size.
> 
> This allows how much WAL files to retain for the standby server, by bytes instead of the number of files.
> If you previously used wal_keep_segments, the following formula will give you an approximately equivalent setting:
> 
> wal_keep_size = wal_keep_segments * wal_segment_size (typically 16MB)
> ------------------------------------

Patch attached.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

Attachments:

wal_keep_size_release_note_v1.patch (text/plain, 1.1K) download diff --git a/doc/src/sgml/release-13.sgml b/doc/src/sgml/release-13.sgml index 22363a186b..c3698c1401 100644 --- a/doc/src/sgml/release-13.sgml +++ b/doc/src/sgml/release-13.sgml @@ -209,6 +209,28 @@ Author: Fujii Masao <fujii@postgresql.org> <listitem> <!-- +Author: Fujii Masao <fujii@postgresql.org> +2020-07-20 [f5dff45962] Rename wal_keep_segments to wal_keep_size. +--> + + <para> + Rename configuration parameter <varname>wal_keep_segments</varname> + to <xref linkend="guc-wal-keep-size"/> (Fujii Masao) + </para> + + <para> + This allows how much WAL files to retain for the standby server, + to be specified by bytes instead of the number of files. If you + previously used <varname>wal_keep_segments</varname>, + the following formula will give you an approximately equivalent setting: +<programlisting> +wal_keep_size = wal_keep_segments * wal_segment_size (typically 16MB) +</programlisting> + </para> + </listitem> + + <listitem> +<!-- Author: Tom Lane <tgl@sss.pgh.pa.us> 2020-03-05 [84eca14bc] Remove ancient hacks to ignore certain opclass names in -->

view thread (24+ messages)  latest in thread

Message-ID: <6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com>
Permalink:  ../6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com/
Also on:    postgresql.org/message-id/6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com

 ·  · 

reply

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: masao.fujii@oss.nttdata.com, david@pgmasters.net, horikyota.ntt@gmail.com, alvherre@2ndquadrant.com
  Subject: Re: max_slot_wal_keep_size and wal_keep_segments
  In-Reply-To: <6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com>

* 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