From: Tom Lane <tgl@sss.pgh.pa.us>
To: David <dbree@duo-county.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Connecting via localhost pg-8.0.3
Date: Thu, 16 Jun 2005 00:08:35 -0400
Message-ID: <10056.1118894915@sss.pgh.pa.us> (raw)
In-Reply-To: <20050616020048.GA1912@localhost.localdomain>
References: <20050615022603.GA1615@localhost.localdomain>
<27553.1118805754@sss.pgh.pa.us>
<20050616020048.GA1912@localhost.localdomain>
David <dbree@duo-county.com> writes:
> Well, you guessed correctly. It was a configuration problem. By
> inserting the line:
> unix_socket_directory = '/var/run/postgresql'
> into postgresql.conf, it works as expected.
Well, you've still got an issue here somewhere, because if your server
and client libraries came from the same build then they ought to agree
on this without any help from the config file. AFAIK, Debian hasn't
changed their policy about where to put the socket, so it seems like you
must be using a server that didn't come from Debian.
> I must confess that I was a bit unclear about the connection parameters.
> I thought that (in php) "host=localhost" meant to use sockets, but this
> means connect through TCP/IP over lo, correct?
Correct --- "localhost" is an IP-ism referring to TCP loopback
connections. In the Unix-socket world there is no name for the local
machine at all, since that is the whole universe anyway ... all you
need for that is a filesystem pathname.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, dbree@duo-county.com
Subject: Re: Connecting via localhost pg-8.0.3
In-Reply-To: <10056.1118894915@sss.pgh.pa.us>
References: <20050615022603.GA1615@localhost.localdomain> <27553.1118805754@sss.pgh.pa.us> <20050616020048.GA1912@localhost.localdomain> <10056.1118894915@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox