Skip site navigation (1) Skip section navigation (2)

text patch -- sugg cmd when run as root

From: Brett McCormick <brett(at)work(dot)chicken(dot)org>
To: pgsql-hackers(at)hub(dot)org
Subject: text patch -- sugg cmd when run as root
Date: 1998-04-30 03:09:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
When you run postgresql as root, the command it gives for putting in
your startup script is a little weird.  The main issue is that 2>&1
only works in bash, not tcsh.  >& works in both, so it seems
preferable.  Another minor issue is that it echoes the command and
pipes it through su.  Shouldn't this be "su - postgres -c 'cmd'"?  Do
all versions of su have the '-c' argument?  piping it through seems
weird, but maybe it isn't.

this is a straight diff for src/backend/main/main.c

--cut here--
< echo \"postmaster -B 256 >/var/log/pglog 2>&1 &\" | su - postgres\n\n"
> su - postgres -c 'postmaster -B 256 >& /var/log/pglog' &\n\n"
--cut here--


pgsql-hackers by date

Next:From: The Hermit HackerDate: 1998-04-30 03:40:28
Subject: Re: [HACKERS] Unlock the vacuum
Previous:From: Bruce MomjianDate: 1998-04-30 02:51:43
Subject: Re: [HACKERS] removing the exec() from doexec()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group