From: | "Barry C(dot) Hawkins" <barry(dot)hawkins(at)allthingscomputed(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Starting postmaster on startup in Mac OS X 10.2.4 via shell script |
Date: | 2003-03-21 16:36:06 |
Message-ID: | 1048264566.3e7b3f76d94bf@www.allthingscomputed.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Colleagues,
I recently installed PostgreSQL 7.3.2 from source on Mac OS X 10.2.4, and I
am wanting to have the server start automatically when the OS starts up.
However, I am having trouble with the shell script to start postmaster.
I can manually su into the user account under which postmaster runs
(named 'pgsql', surprisingly I am sure) and execute the following command line
successfully:
#: /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l logfile -i -o
The shell script equivalent which I am trying to use is as follows:
su -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l logfile -
i -o' pgsql
Upon login, I open a terminal and run 'pg_ctl status' and it confirms that
postmaster is not running. I have also tried the following permutations for
the shell script command line:
su - pgsql -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l
logfile -i -o'
su -l pgsql -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l
logfile -i -o'
su -m pgsql -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l
logfile -i -o'
I am quite new to PostgreSQL, but its feature set seems unparalleled in
open source database platforms, so I really want to get this thing running.
Since I am prompted for the password when I run 'su -l pgsql' manually, I can't
help but think that I am failing to acquire the appropriate context under which
postmaster must run. My logfile also seems to indicate that. I am sure this
is some neophyte error on my part, but if one of the sages would be so kind as
to direct me, I would be most grateful.
Regards,
--
Barry C. Hawkins
Systems Consultant
All Things Computed
barry(dot)hawkins(at)allthingscomputed(dot)com
404-795-9147 voice/fax
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Witney | 2003-03-21 16:41:23 | Re: Starting postmaster on startup in Mac OS X 10.2.4 via |
Previous Message | Tom Lane | 2003-03-21 16:27:24 | Re: Posts get losts |