作者:瀚高PG实验室 (Highgo PG Lab)- 徐云鹤
PG运行过程中出现归档失败的情况,并在日志文件中存在报错。
报错如下:
cp: writing `/arch/20171204/000000010000000000000002': No space left on device
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: DATE=`date +%Y%m%d`;DIR="/arch/$DATE";(test -d $DIR || mkdir -p $DIR)&& cp pg_xlog/000000010000000000000002 $DIR/000000010000000000000002
cp: writing `/arch/20171204/000000010000000000000002': No space left on device
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: DATE=`date +%Y%m%d`;DIR="/arch/$DATE";(test -d $DIR || mkdir -p $DIR)&& cp pg_xlog/000000010000000000000002 $DIR/000000010000000000000002
cp: writing `/arch/20171204/000000010000000000000002': No space left on device
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: DATE=`date +%Y%m%d`;DIR="/arch/$DATE";(test -d $DIR || mkdir -p $DIR)&& cp pg_xlog/000000010000000000000002 $DIR/000000010000000000000002
WARNING: archiving transaction log file "000000010000000000000002" failed too many times, will try again later
原因是归档日志所在文件系统/arch空间不足。
通过清理该文件系统下过期的临时文件,或将归档日志存放至更大的系统空间中。
本文介绍了当PostgreSQL运行过程中出现归档失败错误时的解决办法。错误提示为磁盘空间不足,解决方式包括清理过期文件或更换更大的存储空间。
1401

被折叠的 条评论
为什么被折叠?



