Re: Starting postmaster at boot

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

oh... so since I did a su -l, I could have just used the command,
postmaster -i >>postgres.log 2>>1 & ? Since I had the appropriate variables
in postgres's .bash_profile?

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "Dale Walker" <dale(at)icr(dot)com(dot)au>
To: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>
Cc: "PGSQL General" <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, September 14, 2000 4:33 PM
Subject: Re: [GENERAL] Starting postmaster at boot

> Adam Lang 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's a method for redirecting STDERR --> STDOUT
>
> this is especially usefull in scripts
>
> normally I use [scriptname >/dev/null 2>&1] to send any unwanted output
> to /dev/null
>
> >
> > Why is everyone else's script working without the -l and mine wasn't?
> >
>
>
> '-l' uses the login profile for the su'd user... this is similar to a
> 'simuated login', without it , it was only referencing variables from
> your roo profile ... (ie. no PGDATA,etc..)
>
>
> --
> Dale Walker dale(at)icr(dot)com(dot)au
> Independent Computer Retailers (ICR) http://www.icr.com.au
> ICRnet http://www.icr.net.au

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2000-09-14 20:40:44 Re: Starting postmaster at boot
Previous Message Dale Walker 2000-09-14 20:33:34 Re: Starting postmaster at boot