pg_ctl hangs over ssh
It looks like pg_ctl wants a real terminal for output, which is not allocated by ssh when you simply ask it to run a command. According to the Postgres manual


  On Unix-like systems, by default, the server's standard output and standard error are sent to pg_ctl's standard output (not standard error). The standard output of pg_ctl should then be redirected to a file or piped to another process such as a log rotating program like rotatelogs; otherwise postgres will write its output to the controlling terminal (from the background) and will not leave the shell's process group. [...] These default behaviors can be changed by using -l to append the server's output to a log file. Use of either -l or output redirection is recommended.


Therefore, you either need to tell ssh to allocate a terminal for pg_ctl using the -t options (ssh -t somehost "pg_ctl start") or tell pg_ctl to not write to the terminal (ssh somehost "pg_ctl start &gt;/dev/null" or ssh somehost "pg_ctl start -l /tmp/start.log ")