1

PostgreSQL 10.7

I keep getting the message:

HINT: Consider increasing the configuration parameter "max_wal_size".

So, I updated the following parameters and reloaded the configuration.

checkpoint_timeout = 30min
max_wal_size = 2GB
min_wal_size = 80MB

However, the WAL size stays at 16MB. What did I miss?

Btw, I use repmgr for replication wal_level = replica.

  • The 16MB is the size of the wal segment size - see here. – Vérace May 3 at 13:21
1

max_wal_size controls the total size of all WAL segments, not the size of each segment.

So with a value of 2GB, you are saying that about 128 of those segments can be created before they get re-used.

The hint is about increasing the total number of files (hence the mentioning of max_wal_size), it's not about the size of each segment (file).


Up to Postgres 10, the size of each segment is fixed to 16MB

Starting with Postgres 11, you can change the size of each segment but only when you initialize a new database cluster (but again: that's not what that hint is about).

  • Thank you very much for the information. One more question: Does wal_keep_segments override max_wal_size? – CJ Chang May 3 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.