Re: Can't start PostgreSQL on Fedora Core3 - Mailing list pgsql-general

From Tom Lane
Subject Re: Can't start PostgreSQL on Fedora Core3
Date
Msg-id 23712.1110380315@sss.pgh.pa.us
Whole thread Raw
In response to Can't start PostgreSQL on Fedora Core3  (Ulrich Wisser <ulrich.wisser@relevanttraffic.se>)
Responses Re: Can't start PostgreSQL on Fedora Core3
Re: Can't start PostgreSQL on Fedora Core3
List pgsql-general
Ulrich Wisser <ulrich.wisser@relevanttraffic.se> writes:
> it seems selinix doesn't like postgres. Can I uninstall selinux from
> fedora savely? OR is there any way to make them both work together?

They should work together as long as you have the latest PG RPMs (which
it seems you do) and a reasonably recent selinux-policy-targeted.

One problem is that selinux-policy-targeted updates don't necessarily
propagate to the security labels of the individual files.  I think what
you need to do here is
    sudo /sbin/restorecon -R /var/lib/pgsql
to ensure that /var/lib/pgsql and all its contents are correctly labeled
per your current installed selinux policy.  The reason for thinking
this is that your error message suggests that
/var/lib/pgsql/data/PG_VERSION is labeled root:object_r:var_lib_t,
which I think is the generic default for files under /var/lib,
while in my (working;-)) install it's labeled postgresql_db_t:
$ sudo ls -Z /var/lib/pgsql/data/PG_VERSION
-rw-------  postgres postgres root:object_r:postgresql_db_t    /var/lib/pgsql/data/PG_VERSION

There's some history and info about variant problems at
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143208

            regards, tom lane

pgsql-general by date:

Previous
From: Ian Pilcher
Date:
Subject: Re: Can't start PostgreSQL on Fedora Core3
Next
From: Csaba Nagy
Date:
Subject: Re: Triggers and User Defined Trigger Functions