Home > Archive > PostgreSQL Hacks > October 2005 > pidfile location missing after restarting crashed server in 8.1









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author pidfile location missing after restarting crashed server in 8.1
Robert Treat

2005-10-27, 8:14 am

Fair warning this was in 8.1beta1 so perhaps this is fixed already.

postgres@phppgadmin:
~$ ./start80.sh
pg_ctl: another postmaster may be running; trying to start postmaster anyway
FATAL: pre-existing shared memory block (key 5480001, ID 4063233) is still in
use
HINT: If you're sure there are no old server processes still running, remove
the shared memory block with the command "ipcrm", or just delete the file
"/usr/local/pgsql/data/80/postmaster.pid".
pg_ctl: could not start postmaster
Examine the log output.

postgres@phppgadmin:
~$ ./start81.sh
pg_ctl: another postmaster may be running; trying to start postmaster anyway
FATAL: pre-existing shared memory block (key 5481001, ID 4030464) is still in
use
HINT: If you're sure there are no old server processes still running, remove
the shared memory block with the command "ipcclean", "ipcrm", or just delete
the file "postmaster.pid".
pg_ctl: could not start postmaster
Examine the log output.

the difference being that in 8.0 we printed the full path of the pid file, in
8.1 we do not. there could be a good reason for this, but istm that if we
can detect that a pid file is in our way, we should know its path.

--
Robert Treat
Build A Brighter Lamp :: Linux apache {middleware} PostgreSQL

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Tom Lane

2005-10-27, 8:14 am

Robert Treat <xzilla@users.sourceforge.net> writes:
> the difference being that in 8.0 we printed the full path of the pid file, in
> 8.1 we do not. there could be a good reason for this,


Yeah: it's now being accessed by a relative path (relative to $PGDATA,
which we have already chdir'd into at this point).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Alvaro Herrera

2005-10-27, 8:14 am

Tom Lane wrote:
> Robert Treat <xzilla@users.sourceforge.net> writes:
>
> Yeah: it's now being accessed by a relative path (relative to $PGDATA,
> which we have already chdir'd into at this point).


So we should include PGDATA in the error message (DataDir actually, I
guess).

--
Alvaro Herrera Architect, http://www.EnterpriseDB.com
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Tom Lane

2005-10-27, 8:14 am

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Tom Lane wrote:
[color=darkred]
> So we should include PGDATA in the error message (DataDir actually, I
> guess).


I don't think that follows. The code prints exactly the path name it's
using to access the file, and I think that's exactly what it should
print. Are we going to editorialize similarly on every other message
that includes a file name?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Robert Treat

2005-10-27, 8:14 am

On Wednesday 26 October 2005 14:59, Tom Lane wrote:
> Robert Treat <xzilla@users.sourceforge.net> writes:
>
> Yeah: it's now being accessed by a relative path (relative to $PGDATA,
> which we have already chdir'd into at this point).
>


I thought about this, but it didn't seem to me this would actually prevent us
from explicitly stating the full path to the pid file, just make an extra
hoop we would have to go to. ISTM the helpfulness of the information and the
fact that we are in a fatal startup mode would make it worth it.

--
Robert Treat
Build A Brighter Lamp :: Linux apache {middleware} PostgreSQL

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Alvaro Herrera

2005-10-27, 8:14 am

Tom Lane wrote:
> Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
>
>
> I don't think that follows. The code prints exactly the path name it's
> using to access the file, and I think that's exactly what it should
> print.


It's not useful for the user that way. Besides, we know what we did
chdir() to, so we could present that information to the user.

--
Alvaro Herrera
"Amanece. (Ignacio Reyes)
El Cerro San Cristóbal me mira, cínicamente, con ojos de virgen"

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com