Re: [GENERAL] Again: How the hell do I restart immediately

Поиск
Список
Период
Сортировка
От Gene Selkov, Jr.
Тема Re: [GENERAL] Again: How the hell do I restart immediately
Дата
Msg-id 199910090250.VAA24468@antares.mcs.anl.gov
обсуждение исходный текст
Ответ на Re: [GENERAL] Again: How the hell do I restart immediately  ("Doran L. Barton" <fozz@iodynamics.com>)
Список pgsql-general
> > When the postmaster dies, init will automatically
> > respawn it, much the same as getty, or xdm, etc.
> > Now, since init will be starting the postmaster,
> > the /etc/rc.d/init.d script should be removed and
> > the links to it in /etc/rc.d/rc[whatever].d should
> > also be removed (or you could just not run this
> > service using linuxconf using the control service
> > activity option). And, of course, the switches in
> > the inittab entry above should be adjusted accordingly
> > to the appropriate site's settings.
>
> I tried this initially and init (RedHat 5.2) complained that the command
> string was too long. *sighs*

The first time I was taught indirect addressing was in my elementary
school computer class. Back then, computers were programmed by
plugging metal instruction keys into the wholes on the switchboard. It
is much easier now :)

My inittab entry has the following line:

pg:2345:respawn:/usr/local/pgsql/start.sh

while /usr/local/pgsql/start.sh has the following permissions:

-rwxr-xr-x   1 postgres users         154 Jun 18 19:20 /usr/local/pgsql/start.sh

and reads as:

#!/bin/sh
exec /bin/su - postgres -c "/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -i -B 4096 >>
/usr/local/pgsql/server.log2>&1" /dev/null  

You can add

rm -f /tmp/.s.PGSQL.5432

if you are warried about false starts.


--Gene


В списке pgsql-general по дате отправления:

Предыдущее
От: Gilles Darold
Дата:
Сообщение: unsuscribe
Следующее
От: "Gene Selkov, Jr."
Дата:
Сообщение: Re: [GENERAL] btree index on a char(8) field (fwd)