Thread: indices are crashed after installation of rpm

indices are crashed after installation of rpm

From
Peter Keller
Date:
hello all,
we are running PostgreSQL 7.0.2 on Solaris 2.6,/x86 compiled by gcc 2.8.1.
For installation Postgres on 70 Solaris-2.6 server we built packages
(SVR4-style).

The first time we installed Postgres everything was ok. But after a new
installation of the package ( - same Postgres version - just the starting
script changed) all indices where damaged (this is reproducible).

In the installation script the postmaster is stopped and started. Is it
possible the stopping and starting is crashing the indices,
because sometimes just stopping and starting the postmaster ist crashing the
indices (not reproducible)?

Has someone any idea what's wrong, do you need more informations?
greetings,
Peter


this ist the starting/stopping file S99postgres:

#!/bin/sh

umask 077

killdaemon()
{
        PIDs=`ps -u postgres | sed '/PID/d;s/ \{1,\}/ /g' | cut -d" " -f2 |
sort -rn`
        [ -n "$PIDs" ] && kill $PIDs
        [ -f /tmp/.s.PGSQL.5432 ] && rm -f /tmp/.s.PGSQL.5432
        echo "postmaster stopped"
}

startdaemon()
{
        su postgres -c /export/home/postgres/start_postgres
        echo "postmaster started"

        su postgres -c /export/home/postgres/chk_user \
        && su postgres -c /export/home/postgres/create_user
}

case "$1" in
        'start')
                startdaemon
                ;;
        'stop')
                killdaemon
                ;;
        'restart')
                killdaemon
                startdaemon
                ;;
        *)
                echo "Usage: $0 { start | stop | restart }"
                ;;
esac

exit 0

++++++++++++++++++++++++++
and start_postgres:


PATH=/opt/local/bin:$PATH:/opt/local/DWH/bin:.
LD_LIBRARY_PATH=/usr/openwin/lib:/usr/dt/lib:/opt/local/DWH/lib
export PATH LD_LIBRARY_PATH

PGLIB=/DWH/lib
PGDATA=$HOME/data
export PGLIB PGDATA

postmaster -i -D /export/home/postgres/data >> /tmp/postgres.log


--
        Bezirksfinanzdirektion Muenchen
              Vermessungsabteilung
...............................................................................................
 Peter Keller         :  Tel: (+49) 089-2190-2594
 Vermessungsrat      :  Fax: (+49) 089-2190-2459
 Alexandrastr. 3       :  mailto:Peter.Keller@bvv.bayern.de
 80538 Muenchen   :  web: http://www.bayern.de/vermessung