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 ?