Can't connect to socket in Debian distribution - Mailing list pgsql-novice

From KEVIN ZEMBOWER
Subject Can't connect to socket in Debian distribution
Date
Msg-id sde4c3c5.052@ccp2.jhuccp.org
Whole thread Raw
Responses Re: Can't connect to socket in Debian distribution
List pgsql-novice
I'm trying to set up my first postgreSQL system using the Debian distribution. I'm using the currently stable (woody)
version,and have these packages installed: 
www2:/etc/postgresql# dpkg -l |grep -i postgresql
ii  libpgsql2      7.2.1-2woody2  Shared library libpq.so.2 for PostgreSQL
ii  postgresql     7.2.1-2woody2  Object-relational SQL database, descended fr
ii  postgresql-cli 7.2.1-2woody2  Front-end programs for PostgreSQL

When I try to run psql as root, I get this error:
www2:/etc/postgresql# psql -p mnogosearch mnogosearch
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.0"?

When I list /var/run/postgresql, sure enough, there's no .s.PGSQL.0:
www2:/etc/postgresql# ls -la /var/run/postgresql/
total 12
drwxr-xr-x    2 postgres postgres     4096 Nov 13 15:56 .
drwxr-xr-x    8 root     root         4096 Nov 27 06:26 ..
srwxrwxrwx    1 postgres postgres        0 Nov 13 15:56 .s.PGSQL.5432
-rw-------    1 postgres postgres       29 Nov 13 15:56 .s.PGSQL.5432.lock

Yet, if I change to the mnogosearch user, I seem to have no problems:
www2:/etc/postgresql# su mnogosearch
www2:/etc/postgresql$ psql mnogosearch
Welcome to psql, the PostgreSQL interactive terminal.
[snip]
mnogosearch=> \d
          List of relations
    Name     |   Type   |    Owner
-------------+----------+-------------
 dict        | table    | mnogosearch
[snip]
 stopword    | table    | mnogosearch
 url         | table    | mnogosearch
(18 rows)

mnogosearch=>

I would like some advice on how to fix this problem. I'd like to stay as close as possible to the Debian system. Is
thissomething I can fix in a configuration file or on the command line of the startup of postmaster or psql? 

Thanks for your advice.

-Kevin Zembower

-----
E. Kevin Zembower
Unix Administrator
Johns Hopkins University/Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD  21202
410-659-6139


pgsql-novice by date:

Previous
From: Dan Jewett
Date:
Subject: Re: Error when calling this function....
Next
From: Tom Lane
Date:
Subject: Re: Can't connect to socket in Debian distribution