Skip to content

Instantly share code, notes, and snippets.

@ralphsaunders
Created November 6, 2012 02:25
Show Gist options
  • Save ralphsaunders/4022169 to your computer and use it in GitHub Desktop.
Save ralphsaunders/4022169 to your computer and use it in GitHub Desktop.
I borked Postgresql
ralph:~ ralphsaunders$ sudo psql postgres -c 'CREATE EXTENSION "adminpack";'
Password:
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

ralph:lib ralphsaunders$ ps auxw | grep postgres
    ralphsaunders  87696   0.0  0.0  2455456    592   ??  Ss    2:16am   0:00.08 postgres: writer process       
    ralphsaunders  87695   0.0  0.0  2455456    552   ??  Ss    2:16am   0:00.00 postgres: checkpointer process       
    ralphsaunders  87693   0.0  0.2  2455456   6300   ??  S     2:16am   0:00.02 /usr/local/bin/postgres -D /usr/local/var/postgres -r /usr/local/var/postgres/server.log
    ralphsaunders  87718   0.0  0.0  2434892    488 s003  R+    2:19am   0:00.00 grep postgres
    ralphsaunders  87699   0.0  0.0  2441352    404   ??  Ss    2:16am   0:00.00 postgres: stats collector process       
    ralphsaunders  87698   0.0  0.0  2455588   1532   ??  Ss    2:16am   0:00.00 postgres: autovacuum launcher process       
    ralphsaunders  87697   0.0  0.0  2455456    500   ??  Ss    2:16am   0:00.01 postgres: wal writer process       
ralph:lib ralphsaunders$ lsof -p 87693 | grep unix
postgres 87693 ralphsaunders    4u   unix 0xffffff800b0dd648       0t0           ->0xffffff8015e8c580
postgres 87693 ralphsaunders    8u   unix 0xffffff800b0db190       0t0           /tmp/.s.PGSQL.5432

It looks like the server is running in the right socket, so what's wrong with my setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment