-----Original Message----- From: Monique Y. Herman [mailto:[EMAIL PROTECTED] Sent: Monday, December 15, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: Re: postgresql and domain sockets
On Mon, 15 Dec 2003 at 10:23 GMT, J.H.M. Dassen (Ray) penned: > On Mon, Dec 15, 2003 at 01:01:26 -0700, Monique Y. Herman wrote: >> What have I missed? >> >> ( postgresql 7.3.4-9 on unstable ) > > postgresql-client 7.3.4-9 as well? Yes, sir! >> I just installed this package. When I try to do, well, anything, it >> says: >> >> 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"? >> >> Here's what *is* in the directory after firing up the app: >> >> home:~# ls -l /var/run/postgresql/ total 4.0K srwxrwxrwx 1 >> postgres postgres 0 Dec 15 00:38 .s.PGSQL.5432= -rw------- >> 1 postgres postgres 28 Dec 15 00:38 .s.PGSQL.5432.lock > > This suggests that the database backend is present and listens on the > default port (5432). > >> I see no .s.PGSQL.0, so I guess the obvious question is, how do I get >> one? > > The obvious question isn't always the right one. The right one is most > likely: "why is psql looking for /var/run/postgresql/.s.PGSQL.0 rather > than /var/run/postgresql/.s.PGSQL.5432?". > > The socket name encodes the port number, so you may want to try if > setting the port number explictly helps: psql --port 5432 template1 If > that helps then you may want to check if/why you have the PGPORT > environment variable set. (I can recreate the behaviour you're seeing > when I set PGPORT to 0 or to a non-numeric value) > Interesting. I've since discovered that running psql manually as the postgres user works just fine; it's the provided createdb and createuser tools that cause the problem. I can use psql instead, so I guess it's not a horrifically big deal ... I haven't checked to see whether pg_dump and friends work, though. Now I just need to figure out if this is a package bug, or if it's something weird that I've done. -- monique -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]