Thread: Problem: Postgresql not starting

Problem: Postgresql not starting

From
mohan@physics.gmu.edu
Date:
Hi All
I am using postgresql 7.2 on Linux. It does not start when i am trying this
/etc/rc.d/init.d/postgresql restart.
It give an error saying "postmaster already running".
I have done
rm -f /var/lib/pgsql/data/postmaster.pid
and
rm -f /var/run/postmaster.pid

But it still says the same. whenever i restart with the above command
When say "stop" it says failed and when i say "start" it says postmaster
already running.
Please help me out

--m




Re: Problem: Postgresql not starting

From
Achilleus Mantzios
Date:
Startup scripts for linux hanging around are sometimes
broken.

You better write your own.

O kyrios mohan@physics.gmu.edu egrapse stis Nov 26, 2003 :

> Hi All
> I am using postgresql 7.2 on Linux. It does not start when i am trying this
> /etc/rc.d/init.d/postgresql restart.
> It give an error saying "postmaster already running".
> I have done
> rm -f /var/lib/pgsql/data/postmaster.pid
> and
> rm -f /var/run/postmaster.pid
> 
> But it still says the same. whenever i restart with the above command
> When say "stop" it says failed and when i say "start" it says postmaster
> already running.
> Please help me out
> 
> --m
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
> 

-- 
-Achilleus



Re: Problem: Postgresql not starting

From
Martin Knipper
Date:
Hi,

Am 11/26/03 16:29 schrieb mohan@physics.gmu.edu:
> Hi All
> I am using postgresql 7.2 on Linux. It does not start when i am trying this
> /etc/rc.d/init.d/postgresql restart.
> It give an error saying "postmaster already running".
> I have done
> rm -f /var/lib/pgsql/data/postmaster.pid
> and
> rm -f /var/run/postmaster.pid

Try to find out, if the postmaster if really up by doing something like
ps -e | grep postmaster.

Then you may want to take a look in the script /etc/init.d/postgresql.
Where is the PID-File actually placed ?
It looks like you are trying to remove the PID-File without really 
knowing where it is supposed to be placed ?!

The next option you have is to take a look at some logfiles (e.g 
var/log/messages or something depending on your settings).

Greetings,
Martin






Re: Problem: Postgresql not starting

From
Christoph Haller
Date:
> 
> Hi All
> I am using postgresql 7.2 on Linux. It does not start when i am trying th=
> is
> /etc/rc.d/init.d/postgresql restart.
> It give an error saying "postmaster already running".
> I have done
> rm -f /var/lib/pgsql/data/postmaster.pid
> and
> rm -f /var/run/postmaster.pid
> 
> But it still says the same. whenever i restart with the above command
> When say "stop" it says failed and when i say "start" it says postmaster
> already running.
> Please help me out
> 
> --m
> 
I've seen the other replies, but IMHO you are not supposed to remove 
/var/lib/pgsql/data/postmaster.pid 
to stop the postmaster but 

kill $(head -n 1 $PGDATA/postmaster.pid)

RTFM 
HTH 

Regards, Christoph