Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0FBB69FA0EE for ; Fri, 1 Dec 2006 05:28:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 76536-05 for ; Fri, 1 Dec 2006 05:28:43 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.232]) by postgresql.org (Postfix) with ESMTP id 72E049F9FDA for ; Fri, 1 Dec 2006 05:28:46 -0400 (AST) Received: by nz-out-0102.google.com with SMTP id i11so1447929nzh for ; Fri, 01 Dec 2006 01:28:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=mL+E31EDTb2vQg0fxCBKzqe7AzIzDrIg3F2w7WhlOgT31u1pesASQFHyHl7+P2iJl4Jpti+N1jL8LRNhC0y6e6KMIU+zirqGdeMEENoaScKjxVBjZ4MiLPKaA+8aRst/THYl8qA2zObz4iUR9VUgLKD83ceWZuhZrSA1MLYgrsw= Received: by 10.35.93.1 with SMTP id v1mr8286831pyl.1164965325208; Fri, 01 Dec 2006 01:28:45 -0800 (PST) Received: by 10.35.80.10 with HTTP; Fri, 1 Dec 2006 01:28:45 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 14:58:45 +0530 From: "Rajesh Kumar Mallah" To: "Manish Pillai" Subject: Re: Postgres 8.1.4 is not starting in RHEL 4 Cc: pgsql-admin@postgresql.org In-Reply-To: <414317.51890.qm@web52308.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1054_10125181.1164965325134" References: <414317.51890.qm@web52308.mail.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/2 X-Sequence-Number: 23794 ------=_Part_1054_10125181.1164965325134 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 12/1/06, Manish Pillai wrote: > > Hi > I installed 8.1.4 POSTGRESQL RPMS on my system. When I tried to run > /etc/init.d/postgresql start I got this error. > > [*root@newdell init.d]# ./postgresql start > Initializing database: mkdir: cannot create directory > `/var/lib/pgsql/data/pg_log': File exists > [FAILED] > Starting postgresql service: [FAILED] > * > Then i removed "pg_log" and given > > [*root@newdell data]# pg_ctl --log /tmp/pg.log start > pg_ctl: cannot be run as root > Please log in (using, e.g., "su") as the (unprivileged) user that will > own the server process. > > * > Then i cahnged the user as postgres > > [*root@newdell data]# su postgres > bash-3.00$ pg_ctl --log /tmp/pg.log start > pg_ctl: no database directory specified and environment variable PGDATA > unset > Try "pg_ctl --help" for more information. > bash-3.00$ > * > Please help me > you should 'su - postgres' instead of 'su postgres' and try again. probably PGDATA is not getting set because of that. regds mallah. from man page of su ------------------- su is used to become another user during a login session. Invoked without a username, su defaults to becoming the super user. The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly. Thanks > Manish > > > ------------------------------ > Access over 1 million songs - Yahoo! Music Unlimited. > > ------=_Part_1054_10125181.1164965325134 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 12/1/06, Manish Pillai <manishg_pillai@yahoo.com> wrote:
Hi
I installed 8.1.4 POSTGRESQL RPMS on my system. When I tried to run /etc/init.d/postgresql start I got this error.

[root@newdell init.d]# ./postgresql start
Initializing database: mkdir: cannot create directory `/var/lib/pgsql/data/pg_log': File exists
[FAILED]
Starting postgresql service: [FAILED]
                  Then i removed "pg_log" and given
 
[root@newdell data]# pg_ctl --log /tmp/pg.log start
pg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.


Then i cahnged the user as postgres

[root@newdell data]# su postgres
bash-3.00$ pg_ctl --log /tmp/pg.log start
pg_ctl: no database directory specified and environment variable PGDATA unset
Try "pg_ctl --help" for more information.
bash-3.00$
  Please help me

you should  'su - postgres'  instead of 'su postgres'  and try again.
probably PGDATA is not getting set because of that.

regds
mallah.


from man page of su
-------------------

su is used to become another user during a login session. Invoked without a username,
su defaults to becoming the super user. The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly.


 

Thanks
Manish
 


Access over 1 million songs - Yahoo! Music Unlimited.


------=_Part_1054_10125181.1164965325134--