It seems that pg_dump utility does not handle database name properly with equal to (=) sign in it.
Observe above stack trace, we are generating command line command properly. However pg_dump only takes database name upto equal to sign reset is ignored.
e.g. Database name in command is "!#$%^&*()_+{}|:\"<>?=-\\][';/.," but in pg_dump error it says failed: invalid connection option "!#$%^&*()_+{}|:"<>?"