Le ven 14/11/2003 � 16:14, Warly a �crit :
> -=-=-=-
> Name : postgresql Relocations: (not relocateable)
> Version : 7.3.4 Vendor: MandrakeSoft
> Release : 5mdk Build Date: Fri Nov 14 16:21:02 2003
Interesting problem :
I had a problem starting postgresql after having rebooting my computer
and unfortunately nothing was displayed. i had to start manually in
debugging mode postgresql ( /usr/bin/pg_ctl start -D
/var/lib/pgsql/data/ -o "-d 5" ).
What I see is that it failed one time to launch because
/var/lib/pgsql/data/postmaster.pid exist and was empty. So the only way
to make it start was to remove this file. IMHO, in
/etc/init.d/postgresql we should ensure that this file have been
removed. Normally this file is removed when postgresql is stopped or
when we launched postgresql and no postmatser process is running, but it
seems that there can have some case when this is not true
A patch is joined adding this possibility.
- output when postgresql failed to start :
DEBUG: FindExec: found "/usr/bin/postgres" using argv[0]
FATAL: Can't read lock file /var/lib/pgsql/data/postmaster.pid: File
exists
DEBUG: proc_exit(1)
DEBUG: shmem_exit(1)
DEBUG: exit(1)
- content of /var/lib/pgsql/data/postmaster.pid when postgresql is
running :
6496
/var/lib/pgsql/data
5432001 4685834
---
Pour chaque etre, il existe une sorte d'activite ou il serait utile a la
societe, en meme temps qu'il y trouverait son bonheur. -- Maurice Barres
--- postgresql 2003-11-14 15:20:41.000000000 +0000
+++ postgresql.new 2003-11-19 19:01:26.000000000 +0000
@@ -153,6 +153,7 @@
else
#all systems go -- remove any stale lock files
rm -f /tmp/.s.PGSQL.${PGPORT} > /dev/null
+ rm -f /var/lib/pgsql/data/postmaster.pid > /dev/null
gprintf "%s" "$PSQL_START"
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster -o '-p ${PGPORT}' start > /dev/null 2>&1" < /dev/null
sleep 1