Quite old topic but for those looking for it, you need to change the owner of the the directory, and not the permissions:
$ chown -R postgres /root/pgdata
I also have a similar problem, i was trying to get python' s psycopg2 to work on omega2+ but i cant seem to get pg_config for the omega installed, i also have opened a ticket ~1.5 months ago #7929 but still no reply/news from onion side
Looks like your connection to Community was lost, please wait while we try to reconnect.