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
- Windows pg_basebackup unable to create >2GB pg_wal.tar tarballs ("could not close file: Invalid argument" when creating pg_wal.tar of size ~ 2^31 bytes)
- Re: New "raw" COPY format
- RE: Conflict detection for update_deleted in logical replication
- Apparent bug in WAL summarizer process (hung state)
- Re: filesystem full during vacuum - space recovery issues