您的位置:首页 > 数据库

postgresql归档失败并在日志文件中存在报错

2017-12-13 15:14 856 查看
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空间不足。

通过清理该文件系统下过期的临时文件,或将归档日志存放至更大的系统空间中。

 By 徐云鹤
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐