Retain days and backup schedule work together. Backups are kept until there is no longer a reliance on previous backups. You always need a good base backup. Once a good backup is taken, walarchives associated with older backups outside of the retain days window can be deleted. The maintenance schedule runs by default at 12:00 AM, if one sets the backup schedule and retain days to one, by the third day (after midnight), a good base backup should be available and older WAL files deleted.
解决办法
Manually remove .gz files located in the defined walarchive directory that are not required for current valid backups.