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 1jdykG-0005mL-HK for pgsql-docs@arkaria.postgresql.org; Wed, 27 May 2020 16:17:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jdykE-0003RO-L8 for pgsql-docs@arkaria.postgresql.org; Wed, 27 May 2020 16:17:30 +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 1jdykE-0003OG-9n for pgsql-docs@lists.postgresql.org; Wed, 27 May 2020 16:17:30 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jdykB-0001Tu-B7 for pgsql-docs@lists.postgresql.org; Wed, 27 May 2020 16:17:29 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 06B9121C675F; Wed, 27 May 2020 19:17:24 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from mail.postgrespro.ru (unknown [93.174.131.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id D1E0D21C2435; Wed, 27 May 2020 19:17:23 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1590596243; bh=1jElHyqRzhjg1kI1aETABCQlxZlThvUvRa4Juzi/Xt4=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=f9nqjGd4g3p/k9S72bhh1rx9CtgGhFlVK4z1h4d9inTqbfc3tgRz13dLKYRMPsSsw bF5YTrHfvZI6NgJVI3aYAmH0rV6b54rgrQ/bnwycEHZLRq4ZvjvUfEn9zaTm8nq/vi So9mCCp9iKbbwVGWNkQDGojhJaa+iwp+AHRspRCM= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 27 May 2020 19:17:23 +0300 From: p.luzanov@postgrespro.ru To: "David G. Johnston" Cc: pluzanov@postgrespro.ru, pgsql-docs@lists.postgresql.org Subject: Re: max_wal_size In-Reply-To: References: <159057129673.7025.17016799863173731176@wrigleys.postgresql.org> User-Agent: Roundcube Webmail/1.4.0 Message-ID: <92491c6d07a3216ef2caee8ef55c02b5@postgrespro.ru> X-Sender: p.luzanov@postgrespro.ru List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David, > This setting is the indirect means to ensure that the WAL directory > doesn't get too large by forcing a checkpoint thus allowing the > corresponding WAL to be removed. This is a soft limit, ok. But the question is a little different. Suppose we have: version >= 11, no replication slots, archive_mode = off. Checkpoint_timeout is big enough, so checkpoints triggered only by max_wal_size (1GB). checkpoint_completion_target = 1. What size of WAL files will be generated between checkpoints? 1GB or 0.5GB? As I understand the description of max_wal_size(Maximum size to let the WAL grow to between automatic WAL checkpoints), the answer is 1GB. But it seems that the right answer is 0.5GB. ----- Pavel Luzanov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company