Re: Using an alternate PGDATA on RHEL4 with SELinux enabled

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Esposito" <pgsql-general(at)esposito(dot)newnetco(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using an alternate PGDATA on RHEL4 with SELinux enabled
Date: 2006-07-27 21:06:47
Message-ID: 8542.1154034407@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David Esposito" <pgsql-general(at)esposito(dot)newnetco(dot)com> writes:
> I just tried installing Postgres 8.1.4 (RPMs from postgresql.org web site)
> on a clean RHEL4 Update 2 machine that had SELinux enabled.
> When I created a /etc/sysconfig/pgsql/postgresql config file with
> PGDATA=/data/pgdata
> I was unable to get the start script (/etc/init.d/postgresql) to populate
> the data directory nor launch postgres (after I manually did an initdb on
> the directory)

The default selinux policy prevents postgres from writing anywhere
except under /var/lib/pgsql. If you want a nondefault PGDATA location
then you have to tweak the policy.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ken Johanson 2006-07-27 21:14:50 Re: Backslash as ordinary char vs. not; set via a connection/session
Previous Message David Gagnon 2006-07-27 21:04:25 Re: PostgreSQL theoretical maximums.