From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | lin <jluwln(at)163(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: change the value of "unix_socket_directories" , must used "-h /xx/xx" to use the Unix domain socket |
Date: | 2014-08-16 15:49:59 |
Message-ID: | CAECtzeXhV_kVXxHHT6bhkoHkrEqP4_HC+hUTnSTdYGEbtNFeqA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Le 16 août 2014 17:44, "lin" <jluwln(at)163(dot)com> a écrit :
>
> Hi all,
> I change the value of "unix_socket_directories" in postgresql.conf ,
then restart the database, but it cannot connect the database used like
this
> "psql -d postgres -p 5432" , it must given the parameter " -h /xx/xx" to
use the Unix domain socket。
> how to fix this issue ?
>
That ain't an issue. The client, psql here, can't know where the server put
the socket if it isn't in the default location.
> the test steps as below :
> [wln(at)localhost postgres9.3]$ cat data/postgresql.conf | grep
unix_socket_directories
> unix_socket_directories = '/tmp/wln' # comma-separated list of
directories
>
> [wln(at)localhost postgres9.3]$ psql -d postgres -p 5432
> psql: could not connect to server: No such file or directory.
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> [wln(at)localhost postgres9.3]$ psql -d postgres -p 5432 -h /tmp/wln
> psql (9.3beta2)
> Type "help" for help.
>
> postgres=# \q
> [wln(at)localhost postgres9.3]$
>
> Thanks,
> waln
>
>
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Atkins | 2014-08-16 15:56:13 | Re: change the value of "unix_socket_directories" , must used "-h /xx/xx" to use the Unix domain socket |
Previous Message | John R Pierce | 2014-08-16 15:49:08 | Re: change the value of "unix_socket_directories" , must used "-h /xx/xx" to use the Unix domain socket |