So the long option says "--dbname" which is not really what its expecting. The same issue also applies to pg_receivexlog and pg_dumpall. I wonder if this is a well thought out user API or just an oversight when we chose to use "-d" to pass connection string to the command, In fact, I would have avoided using either -d or --dbname because they are used very frequently in other commands to mean something else.