After a reboot today Postgresql 8.1 came back up and started
accepting connections over TCP but the unix socket file was missing.

This is on Debian Stable, and I can't imagine what might of removed
the file.

Running psql I get:

    $ psql test
    psql: could not connect to server: No such file or directory
            Is the server running locally and accepting
            connections on Unix domain socket 
"/var/run/postgresql/.s.PGSQL.5432"?

Yep, missing:


    $ ls -la /var/run/postgresql
    total 8
    drwxrwsr-x   2 postgres postgres 4096 2006-06-21 17:03 .
    drwxr-xr-x  16 root     root     4096 2006-06-21 21:10 ..

Config looks ok:

    /etc/postgresql/8.1/main$ fgrep unix_socket_dir postgresql.conf 
    unix_socket_directory = '/var/run/postgresql'

Startup option:

    $ ps ux -u postgres | grep unix_socket
    postgres  1512  0.0  0.3  17564  3476 ?        S    17:02   0:00 
/usr/lib/postgresql/8.1/bin/postmaster -D /var/lib/postgresql/8.1/main -c 
unix_socket_directory=/var/run/postgresql -c 
config_file=/etc/postgresql/8.1/main/postgresql.conf -c 
hba_file=/etc/postgresql/8.1/main/pg_hba.conf -c 
ident_file=/etc/postgresql/8.1/main/pg_ident.conf

Hum.  lsof knows about the file.

    $ lsof -p 1512 | grep /var/run
    postmaste 1512 postgres    4u  unix 0xf78b5980           1631 
/var/run/postgresql/.s.PGSQL.5432


Any ideas what happened to the socket?


I had to stop and start the postmaster to get the socket back.



-- 
Bill Moseley
[EMAIL PROTECTED]


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to