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


Reply via email to