pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Egor Rogov <e.rogov@postgrespro.ru>
To: pgsql-docs@lists.postgresql.org
Subject: Re: max_wal_size
Date: Wed, 27 May 2020 13:28:14 +0300
Message-ID: <d472283a-91a8-70dd-d877-cfb3ef03abde@postgrespro.ru> (raw)
In-Reply-To: <5d9bf1bd-d322-ba24-ce89-fa6029eb6615@a-kretschmer.de>
References: <7020bbeb-cde5-b203-9803-2facd964688b@postgrespro.ru>
	<5d9bf1bd-d322-ba24-ce89-fa6029eb6615@a-kretschmer.de>

On 27.05.2020 13:16, Andreas Kretschmer wrote:
>
> Am 27.05.20 um 12:11 schrieb Pavel Luzanov:
>> Hello,
>>
>> About parameter max_wal_size the documentation 
>> <https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-MAX-WAL-SIZE; 
>> says: "Maximum size to let the WAL grow to between automatic WAL 
>> checkpoints."
>> Is it correct?
>>
>> The size between automatic WAL checkpoints or the size of all WAL 
>> files in the pg_wal directory?
>
> size between checkpoints, size of all wal's can be higher, see 
> wal_keep_segments.
>

It is clear that total size can be higher due to wal_keep_segments, 
replications slots, archive_command etc.

But does max_wal_size relate to the (a) two subsequent checkpoints (as 
you may read the wording in the docs) or (b) to the past completed 
checkpoint AND the current yet-uncompleted checkpoint (which together 
may be up to TWO checkpoint intervals)?

If I read CalculateCheckpointSegments() in xlog.c correctly, the answer 
is (b), and hence the documentation is misleading.

Regards,
Egor.







view thread (16+ messages)  latest in thread

Message-ID: <d472283a-91a8-70dd-d877-cfb3ef03abde@postgrespro.ru>
Permalink:  ../d472283a-91a8-70dd-d877-cfb3ef03abde@postgrespro.ru/
Also on:    postgresql.org/message-id/d472283a-91a8-70dd-d877-cfb3ef03abde@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: e.rogov@postgrespro.ru, pgsql-docs@lists.postgresql.org
  Subject: Re: max_wal_size
  In-Reply-To: <d472283a-91a8-70dd-d877-cfb3ef03abde@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox