Owner@gabriel / $ psql -U postgres template1 psql: could not connect to server: Bad file descriptor Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? postgres@gabriel / $ psql -U postgres template1 psql: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. Owner@gabriel / $ ls -dl /usr/share/postgresql/data drwx------+ 2 postgres None 0 Jul 16 02:53 /usr/share/postgresql/data Owner@gabriel / $ ls -l /usr/share/postgresql/data total 0 postgres@gabriel / $ ls -dl /usr/share/postgresql/data drwx------+ 6 postgres None 0 Jul 16 02:53 /usr/share/postgresql/data postgres@gabriel / $ ls -l /usr/share/postgresql/data total 14 -rw------- 1 postgres None 4 Jul 16 02:50 PG_VERSION drwx------+ 4 postgres None 0 Jul 16 02:51 base drwx------+ 2 postgres None 0 Jul 16 02:53 global drwx------+ 2 postgres None 0 Jul 16 02:50 pg_clog -rw------- 1 postgres None 2329 Jul 16 02:50 pg_hba.conf -rw------- 1 postgres None 1441 Jul 16 02:50 pg_ident.conf drwx------+ 2 postgres None 0 Jul 16 02:50 pg_xlog -rw------- 1 postgres None 5178 Jul 16 02:50 postgresql.conf -rw------- 1 postgres None 59 Jul 16 02:53 postmaster.opts -rw------- 1 postgres None 51 Jul 16 02:53 postmaster.pid