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

来源:互联网 发布:阿里云服务器免流教程 编辑:程序博客网 时间:2024/05/22 10:50

PG运行过程中出现归档失败的情况,并在日志文件中存在报错。

报错如下:

cp: writing `/arch/20171204/000000010000000000000002': No space left on deviceLOG:  archive command failed with exit code 1DETAIL:  The failed archive command was: DATE=`date +%Y%m%d`;DIR="/arch/$DATE";(test -d $DIR || mkdir -p $DIR)&& cp pg_xlog/000000010000000000000002 $DIR/000000010000000000000002cp: writing `/arch/20171204/000000010000000000000002': No space left on deviceLOG:  archive command failed with exit code 1DETAIL:  The failed archive command was: DATE=`date +%Y%m%d`;DIR="/arch/$DATE";(test -d $DIR || mkdir -p $DIR)&& cp pg_xlog/000000010000000000000002 $DIR/000000010000000000000002cp: writing `/arch/20171204/000000010000000000000002': No space left on deviceLOG:  archive command failed with exit code 1DETAIL:  The failed archive command was: DATE=`date +%Y%m%d`;DIR="/arch/$DATE";(test -d $DIR || mkdir -p $DIR)&& cp pg_xlog/000000010000000000000002 $DIR/000000010000000000000002WARNING:  archiving transaction log file "000000010000000000000002" failed too many times, will try again later

原因是归档日志所在文件系统/arch空间不足。

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


 By 徐云鹤

阅读全文
1 0
原创粉丝点击