Hey Miles,
Is this issue still a problem for you?
If so, can you log into the postgresql database using psql on the dbserver itself? If so, have you tried disabling the firewall on the dbserver and retrying your psql database connection from the appserver?
Thanks,
Andy