Re: Starting postmaster at boot

From: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>
To: "PGSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Starting postmaster at boot
Date: 2000-09-14 20:13:52
Message-ID: 021001c01e88$4cffec40$330a0a0a@Adam
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

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

Thanks.

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "David Veatch" <dveatch(at)sunflower(dot)com>
To: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>; "PGSQL General"
<pgsql-general(at)postgresql(dot)org>
Sent: Thursday, September 14, 2000 3:29 PM
Subject: Re: [GENERAL] Starting postmaster at boot

> At 03:20 PM 9/14/00 -0400, Adam Lang wrote:
> >I'm still having difficulties getting postgres to start on boot.
> >
> >Any chance someone can give me an example of how they have it on their
> >system?
> >
> >
> >(Seemed to have been lost in the list being down).
> >
> >Adam Lang
> >Systems Engineer
> >Rutgers Casualty Insurance Company
>
> Haven't done much looking into it for efficiency or anything like that,
but
> here's what I have in my rc.local file (FreeBSD 3.2). Hope it helps!
>
>
> #!/bin/sh
> [ -x /usr/local/pgsql/bin/postmaster ] && {
> su -l postgres -c 'exec /usr/local/pgsql/bin/postmaster -D
> /usr/local/pgsql/data -S -o -F -N 48 -B 96> /home/postgres/postgres.log' &
> echo -n ' postgres'
> }
>
> David Veatch - dvicci(at)reckoning(dot)org
>
> "Many people would sooner die than think.
> In fact, they do." - Bertrand Russell

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Lang 2000-09-14 20:17:05 starting at boot up
Previous Message Tom Lane 2000-09-14 20:02:40 Re: OR working strangely.