Re: pgsql and Mac OS X - Mailing list pgsql-general

From Tom Lane
Subject Re: pgsql and Mac OS X
Date
Msg-id 10812.1177976691@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql and Mac OS X  (Michael Glaesemann <grzm@seespotcode.net>)
Responses Re: pgsql and Mac OS X  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
Michael Glaesemann <grzm@seespotcode.net> writes:
> On Apr 30, 2007, at 16:39 , Tom Lane wrote:
>> Yeah, Apple uses Postgres as a part of Remote Desktop, but I don't
>> think
>> they intend it for general use --- it deliberately uses a nonstandard
>> port to avoid conflicting with a regular PG server.

> Really? I've had the Remote Desktop postgres instance prevent others
> from starting on the default port. Matter of fact, I see that it
> started up on 5432 just right now. I wonder if the Remote Desktop
> doesn't check if something else is running on 5432 on startup and use
> another port if it's already in use. Note that I don't think the
> Remote Desktop postgres instance starts on system startup; from
> observation it looks like Remote Desktop needs to be launched for its
> postgres server to start.

Hmm ... the default port wired into the executables definitely seems to
be 5433:

Mini:~ tgl$ /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/psql
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/private/var/db/RemoteManagement/RMDB/.s.PGSQL.5433"?

Mini:~ tgl$ /System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/postmaster --help
/System/Library/CoreServices/RemoteManagement/rmdb.bundle/bin/postmaster is the PostgreSQL server.
...
  -p PORT         port number to listen on (default 5433)
...

It's possible that Remote Desktop overrides that when starting the
postmaster; although dynamically choosing the port doesn't seem very
bright since you've got the problem of how do the clients know where
to connect?

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Allison
Date:
Subject: Re: pgsql and Mac OS X
Next
From: John DeSoi
Date:
Subject: Re: pgsql and Mac OS X