diff options
author | Martin Pihlak | 2012-08-16 09:43:37 +0000 |
---|---|---|
committer | Martin Pihlak | 2012-08-16 09:43:37 +0000 |
commit | 37e91db8fb3a1fcd9a7a54934a2e882a5a953d0c (patch) | |
tree | 12ed4eeace28c4ce632fff7ffb4ac9ae0abbad5c /python/walmgr.py | |
parent | 93efe375803f843bdf572beef542fdf3e474d93c (diff) |
Don't complain if a nonexistent WAL file is encountered during cleanup.
This is to avoid crashes when some cleanup command (such as pg_archivecleanup)
has already removed the wal files.
Diffstat (limited to 'python/walmgr.py')
-rwxr-xr-x | python/walmgr.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/walmgr.py b/python/walmgr.py index f990bdef..e5374705 100755 --- a/python/walmgr.py +++ b/python/walmgr.py @@ -2211,7 +2211,12 @@ STOP TIME: %(stop_time)s if fname < last: self.log.debug("deleting %s" % full) if not self.not_really: - os.remove(full) + try: + os.remove(full) + except: + # don't report the errors if the file has been already removed + # happens due to conflicts with pg_archivecleanup for instance. + pass cur_last = fname return cur_last |