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 1jqHc2-0007WL-Tm for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2020 14:51:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqHc1-00034t-5s for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jun 2020 14:51:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqHc0-000330-UP for pgsql-hackers@lists.postgresql.org; Tue, 30 Jun 2020 14:51:52 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqHbt-0001Q3-Sc for pgsql-hackers@postgresql.org; Tue, 30 Jun 2020 14:51:52 +0000 Received: from hnk.local (p2604028-ipngn12401funabasi.chiba.ocn.ne.jp [180.1.110.28]) by oss.nttdata.com (Postfix) with ESMTPSA id F170D6031F for ; Tue, 30 Jun 2020 23:51:40 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com To: pgsql-hackers@postgresql.org From: Fujii Masao Subject: max_slot_wal_keep_size and wal_keep_segments Message-ID: <574b4ea3-e0f9-b175-ead2-ebea7faea855@oss.nttdata.com> Date: Tue, 30 Jun 2020 23:51:40 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, When I talked about max_slot_wal_keep_size as new feature in v13 at the conference, I received the question like "Why are the units of setting values in max_slot_wal_keep_size and wal_keep_segments different?" from audience. That difference looks confusing for users and IMO it's better to use the same unit for them. Thought? There seem to be several options to do this. (1) Rename max_slot_wal_keep_size to max_slot_wal_keep_segments, and make users specify the number of WAL segments in it instead of WAL size. (2) Rename wal_keep_segments to wal_keep_size, and make users specify the WAL size in it instead of the number of WAL segments. (3) Don't rename the parameters, and allow users to specify not only the number of WAL segments but also the WAL size in wal_keep_segments. Since we have been moving away from measuring in segments, e.g., max_wal_size, I don't think (1) is good idea. For backward compatibility, (3) is better. But which needs more (maybe a bit complicated) code in guc.c. Also the parameter names are not consistent yet (i.e., _segments and _size). So for now I like (2). Thought? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION