PostgreSQL exits the shell when importing large data
Is your physical machine using autologout?

$ echo $TMOUT


When there exists a value above zero, you should unset that environment variable.

$ unset TMOUT


http://www.cyberciti.biz/faq/unset-tmout-under-unix-appleosx-bash-ksh-tcsh-shell/