Thread: postmaster.pid

postmaster.pid

From
"Ian Harding"
Date:
The docs state that postmaster.pid is "A lock file recording the
current postmaster PID and shared memory segment ID (not present after
postmaster shutdown"

I never looked until now, but I see the number 5432001 where the pid
should be, and the real pid is in /tmp/.s.PGSQL.5432.lock, along with
the path to data.

Is the documentation incomplete/misleading or am I doing something odd?

- Ian

Re: postmaster.pid

From
Tom Lane
Date:
"Ian Harding" <harding.ian@gmail.com> writes:
> The docs state that postmaster.pid is "A lock file recording the
> current postmaster PID and shared memory segment ID (not present after
> postmaster shutdown"
> I never looked until now, but I see the number 5432001 where the pid
> should be, and the real pid is in /tmp/.s.PGSQL.5432.lock, along with
> the path to data.

Not sure which PG version you are looking at, but in recent releases the
PID is on the first line, the second line is the $PGDATA path, and the
third has a couple of values associated with shared memory.

            regards, tom lane