Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxUnp-000157-Mo for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2020 12:21:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jxUno-0001is-L3 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jul 2020 12:21:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxUno-0001il-Dg for pgsql-hackers@lists.postgresql.org; Mon, 20 Jul 2020 12:21:52 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxUnk-0006Uw-RT for pgsql-hackers@postgresql.org; Mon, 20 Jul 2020 12:21:51 +0000 Received: from Davids-MacBook-Pro.local (c-73-39-102-148.hsd1.md.comcast.net [73.39.102.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 4C96B54663; Mon, 20 Jul 2020 12:21:47 +0000 (UTC) Subject: Re: max_slot_wal_keep_size and wal_keep_segments To: Fujii Masao , Kyotaro Horiguchi Cc: alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org 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> <87269252-772e-2daf-9955-674a24e24de6@pgmasters.net> <6479e9a4-0a9d-0772-0401-2c5d0de03ea7@pgmasters.net> <6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com> From: David Steele Message-ID: <8b385d28-cb4e-25b2-4fcd-c5b30dd5a9a3@pgmasters.net> Date: Mon, 20 Jul 2020 08:21:46 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <6ff0e503-8bd6-e70f-87bf-fb8389d61f5c@oss.nttdata.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/20/20 6:02 AM, Fujii Masao wrote: > > > 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 most recent megabytes >>>>> +   WAL files plus one WAL file are >>>>> >>>>> How about: >>>>> >>>>> +   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. megabytes of WAL files plus >>>>      one WAL file that were most recently generated are kept all time. >>>> >>>> 2. megabytes + >>> 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 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) >> ------------------------------------ I would rework that first sentence a bit. How about: + This determines how much WAL to retain for the standby server, + specified in megabytes rather than number of files. The rest looks fine to me. Regards, -- -David david@pgmasters.net