Re: WHat foldsers in the data folder would I need to link to have my data on a different drive?

From: "Joel Fradkin" <jfradkin(at)wazagua(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WHat foldsers in the data folder would I need to link to have my data on a different drive?
Date: 2005-02-16 16:48:50
Message-ID: 001101c51447$653bf970$797ba8c0@jfradkin
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Not running SELinux as it is behind a fire wall with only nated
connectivity.

Question is what folder or folders in /data need to be linked to /pgdata in
order to locate the data files, or if I stay with doing a initdb in /pgdata
what startup files needto be edited? Do I just use -D /pgdata then even
though its in /var/lib/pgsql/data and the config in there points to /pgdata?

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Wednesday, February 16, 2005 10:37 AM
To: Joel Fradkin
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] WHat foldsers in the data folder would I need to link
to have my data on a different drive?

"Joel Fradkin" <jfradkin(at)wazagua(dot)com> writes:
> I originally used the data_dir conf option to have my data on /pgslq/data,
> but am thinking I should do it the way I did the /wal with a link. My
> thinking is then the pid would still be in /var not /pgsql, and the
stratup
> and shutdown would work better.

I am just guessing here, not having done the experiment --- but I'm not
at all sure that that will let you escape the SELinux policy
restrictions. I suspect you will find that you have no choice but to
alter the policy to allow the postgres daemon to access your nondefault
data area. (Or turn off SELinux, but that might be an overreaction.)

It might be possible to make an end-run by using a nondefault
installation of Postgres --- if the postmaster executable doesn't live
in /usr/bin, I *think* (but am not certain) that the SELinux targeted
policy will not think it's supposed to constrain the daemon's actions.
Then you are back to relying solely on filesystem permissions; but that
seems like plenty to me.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message pkalva 2005-02-16 18:36:26 Postgres crashed on invalid IP entry in pg_hba.conf
Previous Message Tom Lane 2005-02-16 15:37:14 Re: WHat foldsers in the data folder would I need to link to have my data on a different drive?