Make sure you don't have a partially installed database around. Check the error log for a previous error to this one. Usually you will find it failed somehwere before this, pointing to the actual problem.
Make sure its referencing the correct version of postgresql. If you have two versions in the system, its likely that it is using the wrong psql binary. Set the path to the one you want in the startup nsd-postgres shell script if necessary.
Make sure if you have two different versions of postgresql that psql is connecting to the correct port for the version you want to use.Some versions of psql will connect to a different version of the postgres backend and you won't realize it. Its most likely a misconfiguration in the environment that nsd is running in when it tries to exec psql to load the datamodel.