Skip site navigation (1) Skip section navigation (2)

Re: Cygwin PostgreSQL CVS Patch

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Horák Daniel <horak(at)sit(dot)plzen-city(dot)cz>, pgsql-ports(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: Cygwin PostgreSQL CVS Patch
Date: 2001-01-16 15:03:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-ports

On Tue, Jan 16, 2001 at 12:04:57AM -0500, Tom Lane wrote:
> Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com> writes:
> >> (b) socket file present but no postmaster attached ---
> >> you can get that by kill -9'ing the postmaster ...
> > Unfortunately, case b causes psql to hang.  Using gdb, I was able to
> > trace that psql hangs calling select() in pqWait() (i.e., 
> > src/interfaces/libpq/fe-misc.c line 739).
> > I'm pretty sure that this is Cygwin bug.  I will try to formulate
> > a minimal test for submission to the Cygwin list but I'm not that
> > experienced with sockets.  Would anyone like to assist me with this
> > endeavor?
> You should be able to do something like just creating an unconnected
> socket file and then trying to cat(1) from it ...

I just tried the above on Linux (just to eliminate the Cygwin factor) and
I get the following whether or not postmaster is running:

    $ cat /tmp/.s.PGSQL.5432 
    cat: /tmp/.s.PGSQL.5432: Invalid argument

What am I missing?

> > I will hold off submitting the patch until this is fixed.
> That might be an overreaction --- this does sound like a Cygwin bug
> that should be reported and fixed, but the scenario won't happen in
> normal operations.  Furthermore, if we wait for a confirmed Cygwin
> fix, we'll likely miss the 7.1 release.  I'd suggest going ahead and
> enabling AF_UNIX socket support for Cygwin; worst case is that we
> warn people to be wary of it in Cygwin versions < something-or-other.

The patch has been submitted.  Unfortunately, I just found two more

1. postmaster will start up without complaining about an already existing
unconnected socket file.  It should exit with the following error:

    $ postmaster
    FATAL: StreamServerPort: bind() failed: Address already in use
            Is another postmaster already running on that port?
            If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
    /usr/local/pgsql/bin/postmaster: cannot create UNIX stream port

2. A second postmaster will exit as appropriate but will not display the
above error message.  Instead it displays the following:

    $ postmaster
    Lock file "/usr/local/pgsql/data/" already exists.
    Is another postmaster (pid 385) running in "/usr/local/pgsql/data"?

With all of these issues, does it still make sense to enable UNIX domain
sockets for Cygwin?


Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA                 WWW:

In response to


pgsql-ports by date

Next:From: Peter EisentrautDate: 2001-01-16 15:49:18
Subject: Re: Cygwin PostgreSQL CVS Patch
Previous:From: Jason TishlerDate: 2001-01-16 14:35:14
Subject: Re: Cygwin PostgreSQL CVS Patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group