Subject: Re: start up the postmaster in rc.local

From: ilya lybovich <[email-masked]>
Date: Mon, 28 Dec 1992 12:21:43 +0200

| In order to talk with the backend, I need to start up the postmaster. I
| try to start up the postmaster in /etc/rc.local as follows:

| su - postgres -c "/usr/postgres/bin/postmaster &"

| However, it fails. Although the ps show the postmaster is there, users
| still cannot talk with the backend. I think there is something do with 

| setenv POSTGRESHOME ~postgres.

| I have already created a soft link to /usr/postgres but postmaster
| started from rc.local still cannot work.

| Has anyone encountered this problem before? If you know the solution,
| please send me a e-mial. I will very appreciate it. Thanks.

 we are using the following : 
  1. postmaster setuid'ed by root 
  2. rc.local contains : 
 
   if [ -f /usr/local/etc/postgres.startup ];
     /usr/local/etc/postgres.startup; echo -n ' postgres postmaster'  

  3.  here contents of the  /usr/local/etc/postgres.startup : 
--------------------------------------------------------------------
#! /bin/sh 

if [ -f /usr/local/postgres/bin/postmaster ]; then
         POSTGRESHOME=/usr/local/postgres ; export POSTGRESHOME;
         /usr/local/postgres/bin/postmaster -p `cat /usr/local/postgres/.port`&
fi
---------------------------------------------------------------------

 Ilya Liubovich 
 Department of Computer Science . Hebrew University of the Jerusalem 
 System Group 

E-mail:  [email-masked]

---

From: [email-masked]
Date: Mon, 28 Dec 92 17:32:40 -0800

In order to talk with the backend, I need to start up the postmaster. I
try to start up the postmaster in /etc/rc.local as follows:

su - postgres -c "/usr/postgres/bin/postmaster &"

However, it fails. Although the ps show the postmaster is there, users
still cannot talk with the backend. I think there is something do with 

setenv POSTGRESHOME ~postgres.

I have already created a soft link to /usr/postgres but postmaster
started from rc.local still cannot work.

Has anyone encountered this problem before? If you know the solution,
please send me a e-mial. I will very appreciate it. Thanks.

-----
Alan S. H. Lam
Department of Information Engineering, CUHK, Hong Kong
E-mail: [email-masked] 
Tel: (852) 609 7975 Fax: (852) 603 5032