The post I quoted also says:

"That should not happen; it should always be possible to detect whether
the file is stale, *if* your start script is written correctly."

"That" in the quote refers to my description:
"On system startup PostgreSQL 8.1.4 refuses to start due to the pid
file is [being] left over from [a] previous "session" on Solaris 10
x86."

Nothing did "actually break", but something happened which should not
have happened if my "start script is [had been] written correctly".

The issue here is:
Does the SMF setup described in the referenced Sun document make sure
that the postmaster process will start and become functional without
human intervention even if there is a pid file left over from a
previously crashed (abruptly terminated) postmaster process?

Thanks
Peter

On 2/14/07, Nicolas Williams <Nicolas.Williams at sun.com> wrote:
> On Wed, Feb 14, 2007 at 11:05:17PM +0100, Peter Kovacs wrote:
> > Thank you Stephen for trying to answer my concern in substance!
> >
> > My (possibly naiv) interpretation of the Sun document referenced in my
> > mail is that the command "/lib/svc/method/postgresql start" will be
> > run as "postgres" and if so, this arrangement has the same deficency
> > as my original SMF attempt (described in my message starting the
> > thread on the referenced PostgreSQL mail list) -- that is pg_start
> > (called in /lib/svc/method/postgresql in the Sun document) is run as
> > "postgres". pg_start itself will spawn the "top level" postmaster
> > process whereas in Tom Lane's example the initial postmaster process
> > is started (directly) by root (or daemon or whatever identity the
> > Linux startup scripts are started with -- I am not entirely sure about
> > this detail). Admittedly, I am just a casual user of SMF, so I may
> > miss here some important detail.
>
> That post you quoted said:
>
> "If the start script is written in a way that creates multiple levels of
> postgres-owned processes, you should fix it.  On Linux something
> like this works: ..."
>
> The SMF start method shouldn't do that, and from what I can see, it in
> fact does not.  So what's the issue?  Did something actually break?
>
> Nico
> --
>

Reply via email to