wal_level = archive
archive_mode = on
archive_command = ‘touch /home/myusername/backup/testtouch’
archive_timeout = 30s
…并重新启动Postgresql.触摸列出的文件永远不会出现.我可以手动运行touch命令,它按预期工作.
如果我尝试创建备份,它会永远等待archive_command.在psql中;
postgres=# SELECT pg_start_backup(‘touchtest’);
pg_start_backup
—————–
0/14000020 (1 row)postgres=# SELECT pg_stop_backup();
NOTICE: pg_stop_backup cleanup done,waiting for required WAL segments to be archived > WARNING: pg_stop_backup still waiting for all required WAL segments to be archived (60 seconds elapsed)
HINT: Check that your archive_command is executing properly. pg_stop_backup can be cancelled safely,but the database backup will not be usable without all the WAL segments.
什么会导致这个?我该如何排除故障?
附加信息:在CentOS 5.4上运行.以root身份安装Postgresql 9.0.2.
更新:我首先尝试使用cp -i%p / home / myusername / backup /%f< / dev / null和test进行归档! -f / home / myusername / backup /%f&& cp%p / home / myusername / backup /%f以匹配手册.我将其简化为更简单的触摸呼叫以进行故障排除.