Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8TW7-0002mZ-Bw for pgsql-committers@arkaria.postgresql.org; Fri, 05 Oct 2018 17:03:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8TW5-00071q-Ps for pgsql-committers@arkaria.postgresql.org; Fri, 05 Oct 2018 17:03:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8TW5-00071Y-HA for pgsql-committers@lists.postgresql.org; Fri, 05 Oct 2018 17:03:53 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8TW1-00024q-6J for pgsql-committers@postgresql.org; Fri, 05 Oct 2018 17:03:50 +0000 Received: from Davids-MacBook.local (host86-180-234-155.range86-180.btcentralplus.com [86.180.234.155]) (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 C4DD554661; Fri, 5 Oct 2018 17:03:47 +0000 (UTC) Subject: Re: pgsql: Make WAL segment size configurable at initdb time. To: Andres Freund Cc: pgsql-committers@postgresql.org References: <68ea97d6-2ed9-f339-e57d-ab3a33caf3b1@pgmasters.net> <20181005165447.zyzglieznybyi7wu@alap3.anarazel.de> From: David Steele Message-ID: Date: Fri, 5 Oct 2018 18:03:44 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181005165447.zyzglieznybyi7wu@alap3.anarazel.de> 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 Andres, On 10/5/18 5:54 PM, Andres Freund wrote: > On 2018-09-20 11:48:08 -0400, David Steele wrote: > >> diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml >> index e1073ac6d3..3bfd172441 100644 >> --- a/doc/src/sgml/config.sgml >> +++ b/doc/src/sgml/config.sgml >> @@ -8440,10 +8440,8 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' >> >> >> >> - Reports the number of blocks (pages) in a WAL segment file. >> - The total size of a WAL segment file in bytes is equal to >> - wal_segment_size multiplied by wal_block_size; >> - by default this is 16MB. See for >> + Reports the size of write ahead log segments. >> + The default value is 16MB. See for >> more information. >> >> > > Why is this actually more correct? You mean because we have a conversion > that does the mb conversion at display time? In pre-11 versions of Postgres, you get this: postgres=# select setting, unit from pg_settings where name = 'wal_segment_size'; setting | unit ---------+------ 2048 | 8kB But in v11 you get this: select setting, unit from pg_settings where name = 'wal_segment_size'; setting | unit ----------+------ 16777216 | B So, while the WAL segment size used to be expressed in terms of 8K pages it is now expressed in terms of absolute bytes. This seemed to me to be a very deliberate change in the original commit so I guessed it was done for clarity, but that the docs didn't get the message. Regards, -- -David david@pgmasters.net