Old WAL Files
The main.wal file grows as DDL and DML queries make changes to the database. When the file grows significantly, the system tries to shrink its size by creating a new, smaller version of it. For recovery, previous versions of the file are saved in the main_wal_backups directory of the default data location.
Each file in the main_wal_backups directory is named using its creation timestamp. When the total size of the files in the directory exceeds the configuration parameter
max_old_log_size (on
max_old_log_size), the oldest files in the directory are automatically deleted.
The files in the main_wal_backups directory can be manually removed without adversely affecting the data in the database. Nevertheless, we recommend keeping at least one or two most recent files as backups for database recovery.
Last modified date: 08/14/2024