Re: Cygwin PostgreSQL CVS Patch - Mailing list pgsql-ports
From | Jason Tishler |
---|---|
Subject | Re: Cygwin PostgreSQL CVS Patch |
Date | |
Msg-id | 20010116100315.G145@dothill.com Whole thread Raw |
In response to | Re: Cygwin PostgreSQL CVS Patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Responses |
Re: Cygwin PostgreSQL CVS Patch
|
List | pgsql-ports |
Tom, On Tue, Jan 16, 2001 at 12:04:57AM -0500, Tom Lane wrote: > Jason Tishler <Jason.Tishler@dothill.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 issues: 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/postmaster.pid" 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 -- 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.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
pgsql-ports by date: