From:
Greg Stark <gsstark(at)mit(dot)edu>
To:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Chander Ganesan <chander(at)otg-nc(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: We should Axe /contrib/start-scripts
Date:
2009-08-26 23:51:30
Message-ID:
407d949e0908261651r3acc5570x26595d9a2dfb647c@mail.gmail.com (view raw or flat )
Thread:
2009-08-19 18:18:20 from Josh Berkus <josh(at)agliodbs(dot)com>
2009-08-19 18:39:39 from Chander Ganesan <chander(at)otg-nc(dot)com>
2009-08-19 18:48:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 18:55:22 from Josh Berkus <josh(at)agliodbs(dot)com>
2009-08-19 19:01:30 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 20:09:08 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-19 21:03:52 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 21:14:28 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2009-08-19 21:29:34 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 21:22:23 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-08-19 21:32:35 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-19 22:13:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 22:46:15 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-19 22:52:25 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 19:34:28 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 19:46:31 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2009-08-25 19:54:06 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-25 20:13:24 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 21:23:17 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2009-08-25 19:48:07 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-08-25 19:53:15 from Chander Ganesan <chander(at)otg-nc(dot)com>
2009-08-25 20:03:44 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 20:11:31 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-25 20:27:22 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 20:41:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-25 21:26:11 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 22:03:30 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-25 22:31:50 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 22:42:12 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-08-25 23:07:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-26 14:53:58 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-26 15:05:38 from Chander Ganesan <chander(at)otg-nc(dot)com>
2009-08-26 15:09:58 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-26 15:23:06 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-26 00:17:01 from Aidan Van Dyk <aidan(at)highrise(dot)ca>
2009-08-26 00:22:16 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-26 00:44:17 from Chander Ganesan <chander(at)otg-nc(dot)com>
2009-08-26 23:32:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-26 23:51:30 from Greg Stark <gsstark(at)mit(dot)edu>
2009-08-27 00:01:17 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-27 00:27:42 from Greg Stark <gsstark(at)mit(dot)edu>
2009-08-27 00:38:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-27 00:59:02 from Andrew Dunstan <andrew(at)dunslane(dot)net>
2009-08-27 01:02:40 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-27 06:54:22 from Magnus Hagander <magnus(at)hagander(dot)net>
2009-08-25 20:16:34 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-08-25 20:41:41 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2009-08-25 20:46:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-25 20:47:28 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-08-19 21:52:32 from Greg Stark <gsstark(at)mit(dot)edu>
2009-08-19 22:18:58 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 20:31:47 from Josh Berkus <josh(at)agliodbs(dot)com>
2009-08-19 21:02:54 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-08-19 18:58:56 from "David E(dot) Wheeler" <david(at)kineticode(dot)com>
2009-08-19 19:01:16 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-08-19 19:06:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-08-19 19:00:00 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Lists:
pgsql-hackers
On Thu, Aug 27, 2009 at 12:32 AM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Attached is a simple patch that uses the environment-variable approach.
> This is a whole lot more self-contained than what would be needed to
> pass the PID as an explicit switch, so I'm inclined to do it this way.
> You could argue that a bad guy could confuse matters by intentionally
> passing an existing postmaster's PID in this variable --- but someone
> with the ability to launch the postmaster can probably also remove an
> existing lockfile, so I don't think there's a credible security risk.
>
> Any objections?
So with this change you would have the startup script not remove the
lock file? Postgres would refuse to start up if there was another
process with the same uid running as long as it wasn't pg_ctl or the
parent of pg_ctl?
This could still fail if the startup script runs some other commands
with & to background them and those commands happen to land with the
pid of postgres? Or the startup script runs pg_ctl within a ( )
subshell?
Or are you suggesting making this change but then still recommending
the startup script you have now. So this would just be to make the
problem less severe for people who use pg_ctl without being aware of
the problem?
--
greg
http://mit.edu/~gsstark/resume.pdf
In response to
Responses
pgsql-hackers by date
Next :From: WANGRUNGVICHAISRI, SHIVESHDate: 2009-08-26 23:51:55
Subject : Re: BUG #4996: postgres.exe memory consumption keeps going up
Previous :From : Kevin GrittnerDate : 2009-08-26 23:40:37
Subject : Linux LSB init script