Re: pg_ctl and port number detection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_ctl and port number detection
Date
Msg-id 11425.1292866894@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_ctl and port number detection  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_ctl and port number detection  (Andrew Dunstan <andrew@dunslane.net>)
Re: pg_ctl and port number detection  (Bruce Momjian <bruce@momjian.us>)
Re: pg_ctl and port number detection  (Bruce Momjian <bruce@momjian.us>)
Re: pg_ctl and port number detection  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> No.  If it goes in, it should go in as the third line.  The shmem key
>> data is private to the server --- we do not want external programs
>> assuming anything at all about the private part of postmaster.pid.

> OK, so you are suggesting having it as a third value on the third line?

>     10231
>     /u/pgsql/data
>       5432001  45481984 port_here
>                         ^^^^^^^^^

I'm not sure why you're having such a hard time grasping this concept.
We do not want pg_ctl looking at the shmem key information, not even to
the extent of assuming a particular format for it.  Therefore the port
number has to go before it not after it.  What I'm thinking of is
piddatadirport... here be dragons ...

Actually, if we're going to do this at all, we should do
piddatadirportsocketdir... here be dragons ...

so that pg_ctl doesn't have to assume the server is running with a
default value of unix_socket_dir.  Not sure what to put in the fourth
line on Windows though ... maybe just leave it empty?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Extensions and custom_variable_classes
Next
From: Robert Haas
Date:
Subject: Re: serializable lock consistency