[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

postgresql 7.4 won't start after sarge -> etch upgrade



Dear Debian experts,


I just upgraded an old Sarge server to Etch.

After the upgrade, I notice that the postgresq-7.4 server is not working.
 
ie : the postgreql process wont start by itself on system boot up

I dont know why the postgreql process wont start by itself - when I
did 

/etc/init.d/postgresql-7.4 start
as superuser the postgresql server  did not start.


so I  replaced the system supplied file 


/etc/init.d/postgresql-7.4

with the following file

mlaks@A3:~$ cat /etc/init.d/postgresql-7.4

#!/bin/bash

case "$1" in
        start)
                echo "Starting PostgreSQL daemon..."

                su - postgres -c '/usr/lib/postgresql/7.4/bin/postmaster -D \
                    /var/lib/postgresql/7.4/main  > /dev/null  2>&1 &'

                ;;

        stop)
                echo "Stopping PostgreSQL daemon..."
               su - postgres -c  '/usr/lib/postgresql/7.4/bin/pg_ctl  \
                                 stop -m smart -D /var/lib/postgresql/7.4/main '
                ;;

        restart)
                $0 stop
                sleep 1
                $0 start
                ;;

        status)
             su - postgres -c   '/usr/lib/postgresql/7.4/bin/pg_ctl status -D  \
                             /var/lib/postgresql/7.4/main   '
                ;;

        *)
                echo "Usage: $0 {start|stop|restart|status}"
                exit 1
                ;;
esac

**************************************

now all works.

Questions

1) I dont know what went wrong with the  upgrade... I did not make any changes to postgresql.

This may have something to do with the new 7.4 / 8.1 split, but 

1. I did not install 8.1 
2. I have upgraded other servers before and dont remember this problem.

3. I also notice that  now the postgres user can no longer use 

pg_ctl status - It says that pg_ctl is not found.


ie her ( :) ) PATH does not include 
/usr/lib/postgresql/7.4/bin/, which may be part or all of the problem.


1. How should the sytem be working now? 
2. has any one else had this problem?

How should I rectify the problem?

Mitchell



Reply to: