I'm trying to run pg_archivecleanup from our DR Postgres server (Windows), but I am getting return code 2. I am guessing that the issue may be permissions since I can run the command myself and it works fine, but the Postgres service logs return code 2 and does nothing. I'm hoping that there might be more information about the return code than the Postgres log provides ('archive location does not exist'
)
I have looked in the online and offline documentation and googled to try and get more information about what the return codes mean, but cannot find the information. I don't really want to have to read the code myself for it, as I am not a C developer and may miss some nuance of it's behaviour (even if it is well written enough that I can understand it).
Can anyone help point me towards a reference somewhere (that is apparently hidden from search engines!), or maybe even list the return codes and their meanings here?