Subject: Starting postmaster

From: [email-masked] (rich mayfield)
Date: Mon, 24 Feb 92 07:47:33 -0800

I'm having a problem starting postmaster via my rc.local (SunOS 4.1.1
on an IPX).  I have something like this in rc.local:

POSTGRESHOME=/export/home/postgres ; export POSTGRESHOME

if [ -f $POSTGRESHOME/bin/postmaster ]; then
	$POSTGRESHOME/bin/postmaster & echo 'postmaster'
fi

When booting, "postmaster" gets echo'd so I know the executable is
being found and, presumably, executed.  However when I go to run
the monitor, I get a "Failed to connect to backend ..." message.
I then have to manually start up the postmaster.

Is there something subtle that I'm missing here?  Thanks for
your help

rich
 --------------------------------------------------------
 Rich Mayfield                     Phone: (510)449-6881
 Software Developer                  FAX: (510)449-6885
 Delta Microsystems Inc.           email: [email-masked]

---

From: postarch (Postgres Mailing Archive)
Date: Tue, 25 Feb 92 11:33:24 PST

> I then have to manually start up the postmaster.

This looks ok to me, assuming that the postmaster is executable (if you
can run it manually then i suppose it is).  Any sun expert out there see 
anything wrong?

Is there a postmaster running after you finish booting?

	ps axu | grep postm

Jeff Meredith
[email-masked]

---

From: [email-masked] (Mike Olson)
Date: Tue, 25 Feb 92 12:01:51 PST

> > 	$POSTGRESHOME/bin/postmaster & echo 'postmaster'

try
	if [ -f $POSTGRESHOME/bin/postmaster ]; then
		su postgres -c $POSTGRESHOME/bin/postmaster & echo 'postmaster'
	fi

this will be sure that the postmaster is running as postgres, rather than
as root.  when postmaster forks off a backend, it tries to find its uname
in the database pg_user table, and root doesn't appear, so it will die.

not absolutely sure that this will solve your problem, but it's more correct
than the rc line you show above.

					mike