PostgreSQL: Cannot change directory to /root
Try this: Re: could not change directory to "/root":


  Apparently you did "su postgres" from the root account, so you're
  still in root's home directory.  It'd be better to do "su - postgres"
  to ensure you've acquired all of the postgres account's environment.
  Reading "man su" might help you out here.