Thanks for the reply.
Yes, I understand wal_max_size is a soft limit. But we don’t' have heavy traffic. It's like 4 UPDATE per 2 seconds.
Our data folder is a 4GB network storage, the WAL file folder is around 3.7G.
So, light traffic with 3.7G WAL, no recycling.
We have archive_mode = off
And max_replication_slots = '10'
You can find my postgresql.conf in my first mail.
So, I wan to know under what kind of scenario that there will not be recycling old WAL files.
Is there any way I can check the recycling? For example, logs?
Attach logs
BRs,
Fan Liu
>>-----Original Message-----
>>From: Sergei Kornilov <sk@zsrv.org>
>>Sent: 2020年3月24日 20:33
>>To: Fan Liu <fan.liu@ericsson.com>; PostgreSQL mailing lists
>><pgsql-bugs@lists.postgresql.org>
>>Subject: Re: why wal_max_size does not work?
>>
>>Hello
>>
>>max_wal_size is not the upper limit for pg_wal. Postgresql does not have upper
>>limit for pg_wal at all. This is documented:
>>
>>https://www.postgresql.org/docs/10/runtime-config-wal.html
>>> Maximum size to let the WAL grow to between automatic WAL checkpoints. This
>>is a soft limit; WAL size can exceed max_wal_size under special circumstances,
>>like under heavy load, a failing archive_command, or a high wal_keep_segments
>>setting.
>>
>>so check yours replication slots, archive_command (if archive_mode is enabled),
>>wal_keep_segments
>>
>>regards, Sergei