This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: postgresql and sockets

On May  3 13:24, Krzysztof Duleba wrote:
> Corinna Vinschen wrote:
> > > However, `psql -h localhost -p 5432' succeeds. So in fact the socket
> is
> > > still there, but the link stored in /tmp/.s.PGSQL.5432 is broken.
> >
> > That's rather unlikely.  Could you show us an strace of the above
> failing
> > psql call?  Perhaps there's some interesting information in there.
> >
> >
> > Corinna
> There are 3 cases, so I attach 3 straces.
> str1 is the case when `psql' failed.

Let's stick with this one since that's the important case.  Unfortunately
the strace output doesn't tell us where exactly it fails.  It seems that
the call to get_inet_addr from fhandler_socket::connect is the culprit,
otherwise there would be a set_winsock_errno call somewhere around this

I have the strange feeling that the file isn't recognized as socket
anymore for some reason.  When you called `cat /tmp/.s.PGSQL.5432',
did you use Cygwin's cat?  If the file would have been recognized as
socket, you shouldn't have been able to read the content of the file.
The correct result would have been:

  $ cat /tmp/.s.PGSQL.5432
  cat: /tmp/.s.PGSQL.5432: No such device or address

So I'm wondering if something happened before the call to psql, so that
the file has been... well, "downgraded" to a normal file instead of a
socket file.  Socket files have the system attribute set, for instance.
If you remove this, the file is not recognized as socket file anymore.

Are you set up to debug the DLL using GDB?  If you download the latest
snapshot from and set a breakpoint to
get_inet_addr, you could step through this function until it's left.
The first interesting information would be, from which line the function
is left.

If you're not setup to debug the DLL, I'd try to come up with some
additional debug output for the next Cygwin snapshot.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader
Red Hat, Inc.

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]