Re: staring pgsql on fedora 8

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: newbiegalore <banerjee(dot)anirban(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: staring pgsql on fedora 8
Date: 2008-03-07 06:17:18
Message-ID: 7223.1204870638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

newbiegalore <banerjee(dot)anirban(at)gmail(dot)com> writes:
> hey! thanks for the reply :-). I looked into the pgstartup.log file
> and everything seems to have worked perfectly with the msg at the end
> saying "Success: you can now start...."

> but when I try to start it as a normal user using su normaluser my
> computer just hangs.. arrrrgh!!!!

Try to start *what* as a normal user?

If you mean the Postgres postmaster, you're not supposed to start it as
a normal user; it has to run as the user "postgres" because of the
permissions on the database files. The usual way to start or stop
the postmaster in a standard RPM installation is "sudo /sbin/service
postgresql start" (vice "stop"). Once you've got that working you can
make the service start automatically at system boot (see chkconfig).

> I found the exact
> problem described at http://www.computing.net/linux/wwwboard/forum/29077.html
> and at http://www.centos.org/modules/newbb/viewtopic.php?topic_id=12082
> but the solution is vague to me and using sudo doesn't help either.

If that's your problem then it's a generic issue having nothing much to
do with Postgres. What it sounds like to me is a SELinux problem ...
if things magically start working after "sudo /usr/sbin/setenforce 0"
then that guess is confirmed. I wouldn't recommend that as a permanent
solution though. My best guess as to the cause is that you've got some
files that are labeled with the wrong SELinux context. The solution
Red Hat recommends is

touch /.autorelabel
reboot

The presence of /.autorelabel causes the boot process to reset every
installed file's security label according to what the RPM database says
it should be (sort of like a fsck for permissions, and yeah it'll take a
little while).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anirban Banerjee 2008-03-07 06:32:07 Re: staring pgsql on fedora 8
Previous Message Patrick TJ McPhee 2008-03-07 05:17:44 Re: Postgresql Page Layout details