Type: | integer |
Default: | 1024 (1GB) |
Min: | 2 (2MB) |
Max: | 2147483647 (2147483647MB) |
Unit: | MB |
Context: | sighup |
Restart: | false |
Since: | 9.5 |
Maximum size to let the WAL grow during automatic checkpoints. This is a soft limit; WAL size can exceed max_wal_size
under special circumstances, such as heavy load, a failing archive_command or archive_library, or a high wal_keep_size setting. If this value is specified without units, it is taken as megabytes. The default is 1 GB. Increasing this parameter can increase the amount of time needed for crash recovery. This parameter can only be set in the postgresql.conf file or on the server command line.
Recommendations
… except for databases that write more than 1GB/hour of data, in which case increase the size of the log so that it's at least an hour worth of logs
On StackOverflow
On pgsql-hackers
- Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL
- Enforce "max_wal_size/ min_wal_size must be at least twice wal_segment_size" limit while setting GUCs
- Re: Can postgres ever delete the recycled future WAL files to free-up disk space if max_wal_size is reduced or wal_recycle is set to off?
- KeepLogSeg needs some fixes on behavior
- Re: Enforce "max_wal_size/ min_wal_size must be at least twice wal_segment_size" limit while setting GUCs