Re: [HACKERS] pid file for postmaster?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Holloway <mtsinc(at)southeast(dot)net>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] pid file for postmaster?
Date: 1999-11-25 15:59:06
Message-ID: 13198.943545546@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tim Holloway <mtsinc(at)southeast(dot)net> writes:
> Red Hat ALREADY creates a file "postmaster.pid" in the /var/lock directory.

If they did it just like that, then they broke the ability to run more
than one postmaster on the same machine. Also, there is the question
of what the permissions are on /var/lock. If they're tight then postgres
can't be an ordinary unprivileged user, which is bad. If they're loose
then anyone can come along and cause trouble by fiddling with the lock
files.

There was considerable discussion of this whole area last year in
pg-hackers (check the thread "flock patch breaks things here" and
related threads starting in late Aug. 1998). We were focusing mostly
on the use of lockfiles to ensure that one didn't accidentally start
two postmasters in the same database dir and/or with the same port
number; but if the lockfiles contain PIDs then of course they can also
serve as a contact point for a signal-sender.

Tatsuo, if you have forgotten that discussion you may want to go back
and re-read it.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 1999-11-25 16:02:57 Re: [HACKERS] Re: [PATCHES] ':' and ';' operators
Previous Message Tom Lane 1999-11-25 15:47:20 Re: [HACKERS] Re: [PATCHES] ':' and ';' operators