From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-admin@postgresql.org
Subject: Re: auto removing stale pid for postmaster NT service
Date: Mon, 16 Sep 2002 16:41:29 -0400
Message-ID: <20020916164129.W4394@mail.libertyrms.com> (raw)
In-Reply-To: <20020916165546.9B98.TELLINI@areabusiness.it>
References: <OFB91CFC47.33257F49-ON85256C31.00654C8C@putnaminv.com>
<26090.1032182629@sss.pgh.pa.us>
<20020916165546.9B98.TELLINI@areabusiness.it>
On Mon, Sep 16, 2002 at 04:56:26PM +0200, Simone Tellini wrote:
>
> it happens on linux as well: if there's a stale file at boot, it refuses
> to start saying that it's already running.
Not exactly.
If there is a stale pid file, it looks to see if a process with that
pid exists. _Then_ it refuses to start.
This is because there is a process with the same pid as the
postmaster. This will happen in cases where the machine crashes and
starts up again -- something else happens to get the (former)
postgres pid at startup, and so when postgres checks for a process
with that pid, one exists. And kerplooey.
I seem to recall that someone (maybe Tom Lane?) suggested an
extension to the current pidfile check, so that it will also check to
see if the process really is PostgreSQL. But I don't know if it was
implemented.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: auto removing stale pid for postmaster NT service
In-Reply-To: <20020916164129.W4394@mail.libertyrms.com>
References: <OFB91CFC47.33257F49-ON85256C31.00654C8C@putnaminv.com> <26090.1032182629@sss.pgh.pa.us> <20020916165546.9B98.TELLINI@areabusiness.it> <20020916164129.W4394@mail.libertyrms.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox