On 20/07/11 19:02, Gavrina, Irina wrote: > Hello All, > > > > I’ve faced with the following problem: I’m trying to implement the auto start of postgres. My way is to use inittab: > > pg:2345:respawn:/bin/su - postgres -c "/usr/local/pgsql/bin/postmaster Are you working on some kind of embedded platform? For any modern Linux or UNIX, the init subsystem takes care of this with init scripts. Newer Linux systems use `upstart' or `systemd' instead of old-style sysv init; these newer init systems support init "scripts" that can monitor and re-start processes. See the upstart and systemd documentation. If you're trying to re-start the postmaster when it exits, the bigger question is: why is it exiting? It shouldn't be, and that's what you need to fix. Typically you'd just start the postmaster at boot and leave it running. If you want system self-healing and recovery, there are existing monitoring solutions like nagios that support running scripts when certain kinds of failures appear. Be aware, though, that if the postmaster has exited then something is already wrong, and trying to just re-start it might mask a problem and prevent you from finding out about it until it is much worse. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general