Cleaning up archives in Postgres after using systemd
The problem is that the PATH environment is different.

I had this line in recovery.conf:

archive_cleanup_command = 'pg_archivecleanup /var/lib/pgsql/9.3/standby/archive %r'


And Postgres doesn't find pg_archivecleanup and silently ignores it.

Solution is to change the line to this:

archive_cleanup_command = '/usr/pgsql-9.3/bin/pg_archivecleanup /var/lib/pgsql/9.3/standby/archive %r'