Re: Starting postmaster at boot
От | Mitch Vincent |
---|---|
Тема | Re: Starting postmaster at boot |
Дата | |
Msg-id | 010601c01e8c$0e8250d0$0200000a@doot обсуждение исходный текст |
Ответ на | Re: Starting postmaster at boot (David Veatch <dveatch@sunflower.com>) |
Список | pgsql-general |
The reason I didn't have to use the -l is that I have everything PostgreSQL needs (as far as environment variables) already set, because this machine is a dedicated PostgreSQL server. Sorry, should have thought about that before I replied but it seems you have it running now, that's great.. Good luck! -Mitch ----- Original Message ----- From: "Dale Walker" <dale@icr.com.au> To: "Adam Lang" <aalang@rutgersinsurance.com> Cc: "PGSQL General" <pgsql-general@postgresql.org> Sent: Thursday, September 14, 2000 1: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@icr.com.au > Independent Computer Retailers (ICR) http://www.icr.com.au > ICRnet http://www.icr.net.au >
В списке pgsql-general по дате отправления: