Re: Starting postmaster at boot

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Adam Lang <aalang(at)rutgersinsurance(dot)com>
Cc: PGSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Starting postmaster at boot
Date: 2000-09-14 20:25:20
Message-ID: 20000914132520.V12231@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Adam Lang <aalang(at)rutgersinsurance(dot)com> [000914 13:21] wrote:
> I didn't directly use your method, but you nonetheless solved my problem.
> >From the beginning everyone was telling me to put this into my rc.local:
> su postgres -c "/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data -i
> /usr/local/pgsql/postgres.log 2>&1 &"
>
> It was never working. I noticed you had a tag "-l" in yours for su. I
> looked up the reason for it and gave it a try. So the script:
> su -l postgres -c "/usr/local/pgsql/bin/postmaster -D
> /usr/local/pgsql/data -i /home/postgres/postgres.log 2>1 &"
> does work.
>
> I still don't understand the point of the 1's and 2's in the command though.

It tells the shell to hook the child's stderr to stdout so that all
output should go to /home/postgres/postgres.log.

> Why is everyone else's script working without the -l and mine wasn't?

Check su's manpage.

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dale Walker 2000-09-14 20:30:44 vacuum taking long time
Previous Message Adam Lang 2000-09-14 20:17:05 starting at boot up