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?
От | Bharath Rupireddy |
---|---|
Тема | 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? |
Дата | |
Msg-id | CALj2ACU3ovReRGggVGK6Q+CwX1Aiy0NRo7qn8fg8Ke1vngo-bQ@mail.gmail.com обсуждение исходный текст |
Ответы |
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?
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? |
Список | pgsql-hackers |
Hi, I have a scenario where max_wal_size = 10GB and wal_recycle = on, the postgres starts to recycle and keep WAL files for future use, eventually around 600~ WAL files have been kept in the pg_wal directory. The checkpoints were happening at regular intervals. But the disk was about to get full (of course scaling up disk is an option) but to avoid "no space left on device" crashes, changed max_wal_size = 5GB, and issued a checkpoint, thinking that postgres will free up the 5GB of disk space. It seems like that's not the case because postgres will not remove future WAL files even after max_wal_size is reduced, but if it can delete the future WAL file(s) immediately, the server would have had 5GB free disk space to keep the server up avoiding crash and meanwhile disk scaling can be performed. Can postgres delete the recycled future WAL files once max_wal_size is reduced and/or wal_recycle is set to off? Thoughts? Regards, Bharath Rupireddy.
В списке pgsql-hackers по дате отправления: