Re: [GENERAL] Again: How the hell do I restart immediately - Mailing list pgsql-general

From Gene Selkov, Jr.
Subject Re: [GENERAL] Again: How the hell do I restart immediately
Date
Msg-id 199910090250.VAA24468@antares.mcs.anl.gov
Whole thread Raw
In response to Re: [GENERAL] Again: How the hell do I restart immediately  ("Doran L. Barton" <fozz@iodynamics.com>)
List 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 by date:

Previous
From: Gilles Darold
Date:
Subject: unsuscribe
Next
From: "Gene Selkov, Jr."
Date:
Subject: Re: [GENERAL] btree index on a char(8) field (fwd)