Re: Cygwin PostgreSQL CVS Patch - Mailing list pgsql-ports

From Tom Lane
Subject Re: Cygwin PostgreSQL CVS Patch
Date
Msg-id 12564.979660649@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cygwin PostgreSQL CVS Patch  (Jason Tishler <Jason.Tishler@dothill.com>)
Responses Re: Cygwin PostgreSQL CVS Patch  (Jason Tishler <Jason.Tishler@dothill.com>)
List pgsql-ports
Jason Tishler <Jason.Tishler@dothill.com> writes:
>> 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?

Nothing ... I hadn't actually tried that, but now that I do, I get

$ cat /tmp/.s.PGSQL.5432
cat: Cannot open /tmp/.s.PGSQL.5432: Operation not supported

so apparently you can't open a socket file except by using bind()
and so forth.  Sorry for the misinformation.

> 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"?

That does not look like a bug; the data directory lockfile is created
first.  To test this properly, you'll need two data directories set up
so that you can start two postmasters (use the -D switch to direct each
one to the right place; you'll also need -D for initdb).  They should
start if given different port numbers (-p) or fail if the same port.
Might want to try different combinations of -i and not -i while you are
at it.

            regards, tom lane

pgsql-ports by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Cygwin PostgreSQL CVS Patch
Next
From: Stephan Richter
Date:
Subject: PostGreSQL on Windows Help