Strangely, on one of our server, pg_dumpall, when executed by cron, only dumps "postgres" database, instead of all databases.
But when executing it from command line, it works.
I suspect it must be due to some environment variable, but I don't know where it may come from.
Of course I can provide more information if needed, but I don't know what to give more, because I don't exactly know the source of this strange problem ?
Clearly, the cron script is executing either
If you're on Ubuntu or Debian make sure you're using the one in your path directly, you may have one in
/usr/lib
and one in/usr/bin