From: Peter Kovacs <maxottovonstirlitz@gmail.com>
To: pgsql-admin@postgresql.org
Subject: pid file problem
Date: Mon, 12 Feb 2007 20:02:22 +0100
Message-ID: <b6e8f2e80702121102p5f3d5f7cj4b5874a7b0040cf9@mail.gmail.com> (raw)
Hi,
On system startup PostgreSQL 8.1.4 refuses to start due to the pid
file is left over from previous "session" on Solaris 10 x86. After
removing the old pid file, PG start up and creates a new pid file:
[root@sungift] /# ls -l /var/opt/postgresql/data/postmaster.pid
-rw------- 1 postgres dba 50 Feb 12 19:47
/var/opt/postgresql/data/postmaster.pid
In the logfile I find:
LOCATION: SocketBackend, postgres.c:295
LOG: 00000: received smart shutdown request
LOCATION: pmdie, postmaster.c:1885
LOG: 00000: shutting down
LOCATION: ShutdownXLOG, xlog.c:5031
FATAL: 58P01: could not remove old lock file "postmaster.pid": No
such file or directory
HINT: The file seems accidentally left over, but it could not be
removed. Please remove the file by hand and try again.
The start and stop entries for SVC look like the following:
<exec_method
type='method'
name='start'
exec='/opt/postgresql/8.1.4/bin/pg_ctl start -l
/var/opt/postgresql/log/logfile'
timeout_seconds='60'>
<method_context>
<method_credential user='postgres' group='dba' />
<method_environment>
<envvar name="TMPDIR" value="/tmp"/>
<envvar name="PATH"
value="/opt/postgresql/8.1.4/bin:/usr/bin:/usr/ucb:/etc:.:/usr/sfw/bin:/usr/local/bin:/usr/ccs/bin"/>
<envvar name="LD_LIBRARY_PATH"
value="/opt/postgresql/8.1.4/lib"/>
<envvar name="PGDATA" value="/var/opt/postgresql/data"/>
</method_environment>
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec='/opt/postgresql/8.1.4/bin/pg_ctl stop'
timeout_seconds='60'>
<method_context>
<method_credential user='postgres' group='dba' />
<method_environment>
<envvar name="TMPDIR" value="/tmp"/>
<envvar name="PATH"
value="/opt/postgresql/8.1.4/bin:/usr/bin:/usr/ucb:/etc:.:/usr/sfw/bin:/usr/local/bin:/usr/ccs/bin"/>
<envvar name="LD_LIBRARY_PATH"
value="/opt/postgresql/8.1.4/lib"/>
<envvar name="PGDATA" value="/var/opt/postgresql/data"/>
</method_environment>
</method_context>
</exec_method>
Please, could you tell me why the pid file is not deleted on shutdown?
Thanks
Peter
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: maxottovonstirlitz@gmail.com
Subject: Re: pid file problem
In-Reply-To: <b6e8f2e80702121102p5f3d5f7cj4b5874a7b0040cf9@mail.gmail.com>
References: <b6e8f2e80702121102p5f3d5f7cj4b5874a7b0040cf9@mail.gmail.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