Обсуждение: psql connection error

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

psql connection error

От
"Raul Secan"
Дата:
Hello, I succesfuly installed PostgreSQL 7.3.3 on Cygwin 1.3.22.
I am running WinXP Professional, and the PostgreSQL and ipc-daemon, are installed as Windows services.
 
Well I can stop them, and start them and everything seems to look normal.
 
The point is that I can't connect with psql command to the server, but I can connect with phpPgAdmin, and make all operations available there.
 
I realy need to use psql command, but when I try to connect I receive this:
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ psql -d template1 -U postgre
psql: could not connect to server: Bad file descriptor
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
My pgsql data directory is: /home/postgre/data/
 
I also verify the pg_hba.conf file an have there:
# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
 
local   all         all                                             trust
host    all         all         127.0.0.1         255.255.255.255   trust
 
So it looks ok, and I even uncomment the line port = 5432 from postgresql.conf.
 
I just don't know what is happening.
 
I even try this:
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ pg_ctl status
pg_ctl: no database directory or environment variable $PGDATA is specified
Try 'pg_ctl --help' for more information.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Can someone help me? Thanks.

Re: psql connection error

От
Jason Tishler
Дата:
Raul,

On Sat, Dec 20, 2003 at 02:01:10PM +0200, Raul Secan wrote:
> Hello, I succesfuly installed PostgreSQL 7.3.3 on Cygwin 1.3.22.  I am
> running WinXP Professional, and the PostgreSQL and ipc-daemon, are
> installed as Windows services.
>
> [snip]
>
> Can someone help me? Thanks.

IIRC, there was a bug in Cygwin 1.3.22 that prevented Unix domain socket
access to PostgreSQL.  Your options are:

    1. Upgrade to the latest Cygwin, cygipc, and PostgreSQL
    2. Access PostgreSQL via TCP/IP sockets (i.e., psql -h localhost)

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6