Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YPzh7-0004wd-61 for pgsql-committers@arkaria.postgresql.org; Mon, 23 Feb 2015 20:33:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YPzh6-0001ut-KX for pgsql-committers@arkaria.postgresql.org; Mon, 23 Feb 2015 20:33:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YPzh5-0001t9-IM for pgsql-committers@postgresql.org; Mon, 23 Feb 2015 20:33:31 +0000 Received: from cronos.madness.at ([2a02:16a8:dc41::10]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YPzh1-0002dy-Lk for pgsql-committers@postgresql.org; Mon, 23 Feb 2015 20:33:30 +0000 Received: from mastermind.kaltenbrunner.cc ([2001:470:7a2d::22]) by cronos.madness.at with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YPzgt-0008St-BU; Mon, 23 Feb 2015 21:33:21 +0100 Message-ID: <54EB8E8A.1090103@kaltenbrunner.cc> Date: Mon, 23 Feb 2015 21:33:14 +0100 From: Stefan Kaltenbrunner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Heikki Linnakangas , pgsql-committers@postgresql.org Subject: Re: pgsql: Replace checkpoint_segments with min_wal_size and max_wal_size. References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org On 02/23/2015 05:53 PM, Heikki Linnakangas wrote: > Replace checkpoint_segments with min_wal_size and max_wal_size. > > Instead of having a single knob (checkpoint_segments) that both triggers > checkpoints, and determines how many checkpoints to recycle, they are now > separate concerns. There is still an internal variable called > CheckpointSegments, which triggers checkpoints. But it no longer determines > how many segments to recycle at a checkpoint. That is now auto-tuned by > keeping a moving average of the distance between checkpoints (in bytes), > and trying to keep that many segments in reserve. The advantage of this is > that you can set max_wal_size very high, but the system won't actually > consume that much space if there isn't any need for it. The min_wal_size > sets a floor for that; you can effectively disable the auto-tuning behavior > by setting min_wal_size equal to max_wal_size. > > The max_wal_size setting is now the actual target size of WAL at which a > new checkpoint is triggered, instead of the distance between checkpoints. > Previously, you could calculate the actual WAL usage with the formula > "(2 + checkpoint_completion_target) * checkpoint_segments + 1". With this > patch, you set the desired WAL usage with max_wal_size, and the system > calculates the appropriate CheckpointSegments with the reverse of that > formula. That's a lot more intuitive for administrators to set. > > Reviewed by Amit Kapila and Venkata Balaji N. I think this one broke the docs build: http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=guaibasaurus&dt=2015-02-23%2020%3A17%3A02 Stefan -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers