Обсуждение: non-root installation of Postgresql?

Поиск
Список
Период
Сортировка

non-root installation of Postgresql?

От
Terrence Brannon
Дата:
Hi, I used ./configure --prefix=/home/metaperl/install/pgsql to
install postgres and then I did initdb and createdb and started the
postmaster just fine.

However, attempting to connect via psql is failing with this error
message:

urth:~/install/pgsql> ./bin/psql test metaperl
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"?
urth:~/install/pgsql>
urth:~/install/pgsql>

I looked around for a way to force sockets to be created in /tmp or in
my home directory but saw nothing in the manual.


Re: non-root installation of Postgresql?

От
AarniRuuhimäki / Megative Tmi / KYMI.com
Дата:
Hi !

Did you start postmaster with -i switch ?

BR, aarni



On Thursday 02 May 2002 03:34 pm, you wrote:
> Hi, I used ./configure --prefix=/home/metaperl/install/pgsql to
> install postgres and then I did initdb and createdb and started the
> postmaster just fine.
>
> However, attempting to connect via psql is failing with this error
> message:
>
> urth:~/install/pgsql> ./bin/psql test metaperl
> 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"?
> urth:~/install/pgsql>
> urth:~/install/pgsql>
>
> I looked around for a way to force sockets to be created in /tmp or in
> my home directory but saw nothing in the manual.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


Re: non-root installation of Postgresql?

От
Terrence Brannon
Дата:
Aarni Ruuhimäki / Megative Tmi / KYMI.com writes:
 : Hi !

Hi!

 :
 : Did you start postmaster with -i switch ?

I just tried it with -i and it still has the same error.

I dont want it messing around with /var as I am not root.


 :
 : BR, aarni
 :
 :
 :
 : On Thursday 02 May 2002 03:34 pm, you wrote:
 : > Hi, I used ./configure --prefix=/home/metaperl/install/pgsql to
 : > install postgres and then I did initdb and createdb and started the
 : > postmaster just fine.
 : >
 : > However, attempting to connect via psql is failing with this error
 : > message:
 : >
 : > urth:~/install/pgsql> ./bin/psql test metaperl
 : > 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"?
 : > urth:~/install/pgsql>
 : > urth:~/install/pgsql>
 : >
 : > I looked around for a way to force sockets to be created in /tmp or in
 : > my home directory but saw nothing in the manual.
 : >
 : >
 : > ---------------------------(end of broadcast)---------------------------
 : > TIP 4: Don't 'kill -9' the postmaster
 :


Re: non-root installation of Postgresql?

От
Tom Lane
Дата:
Terrence Brannon <blessed@sv-luka.org> writes:
> Hi, I used ./configure --prefix=/home/metaperl/install/pgsql to
> install postgres and then I did initdb and createdb and started the
> postmaster just fine.

> However, attempting to connect via psql is failing with this error
> message:

> urth:~/install/pgsql> ./bin/psql test metaperl
> 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"?

It looks to me like psql is looking for the socket in some other
directory than where the postmaster created it.  Do you perhaps
have an environment variable set that would override the compiled-in
default location?  (I think PGHOST=/var/run/postgresql would cause
the above behavior in psql, but AFAIR the postmaster does not pay any
attention to PGHOST.)

            regards, tom lane

Re: non-root installation of Postgresql?

От
Terrence Brannon
Дата:
Tom Lane writes:
 : Terrence Brannon <blessed@sv-luka.org> writes:
 : > Hi, I used ./configure --prefix=/home/metaperl/install/pgsql to
 : > install postgres and then I did initdb and createdb and started the
 : > postmaster just fine.
 :
 : > However, attempting to connect via psql is failing with this error
 : > message:
 :
 : > urth:~/install/pgsql> ./bin/psql test metaperl
 : > 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"?
 :
 : It looks to me like psql is looking for the socket in some other
 : directory than where the postmaster created it.  Do you perhaps
 : have an environment variable set that would override the compiled-in
 : default location?  (I think PGHOST=/var/run/postgresql would cause
 : the above behavior in psql, but AFAIR the postmaster does not pay any
 : attention to PGHOST.)

There was a /usr/bin/psql in my PATH superceding
~/install/bin/pgsql/bin/psql

Thanks for your help.