1. first of all, try SSH to your VCSA and stablish your session with root credentials or something like that privilege:)
2. Then after enable shell by this "shell.set --enabled True" and granting shell access, you can find-out vPostgres configuration and credential on these below files (by vi & less):
/etc/vmware-vpx/embedded_db.cfg
/etc/vmware-vpx/vcdb.properties
3. Now you can successfully connect to your DB by username: vc and gained password from mentioned files.
4.Consider some situations:
Maybe you cannot access to your database remotely , so edit file /storage/db/vpostgres/pg_hba.conf on VCSA and add following line to file. Be careful to do on right place to work correctly, exactly where IPv4 or IPv6 are mentioned.
host all all IPAddr/SubMsk md5
Then edit /storage/db/vpostgres/postgresql.conf and add this line to made database for listening on all IP addresses: listen_addresses = '*'
And at the end of all, execute one of these commands to restart vpostgres service on VCSA and commit the changes have been done:
/etc/init.d/vmware-vpostgres restart or service vmware-vpostgres restart
Also you can verify established connections on PostgreSQL port (TCP 5432) by running piping greps on netstat like this:
netstat -anp | grep LISTEN | grep tcp | grep 5432
But if your server don't listen on port 5432, Try this:
/usr/lib/applmgmt/networking/bin/firewall-reload
So you can verify your listening services by doing: iptables -L | grep postgres
Source of Content inside my personal blog: Undercity of Virtualization: Connect and Manage VCSA Database (PostgreSQL)