I have streaming replication setup on 2 Postgres 9.1 servers. Everything is ok apart from the archivecleanup. In the logs it says:
sh: 1: pg_archivecleanup: not found 2013-11-19 09:17:37 GMT WARNING: archive_cleanup_command "pg_archivecleanup /var/lib /postgresql/9.1/wals/ %r": return code 32512
I can see pg_archivecleanup is in /usr/lib/postgresql/9.1/bin. Why can Postgres not see this?