Unix Technical Forum

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

This is a discussion on Re: WHat foldsers in the data folder would I need to link to have my data on a different drive? within the pgsql Admins forums, part of the PostgreSQL category; --> "Joel Fradkin" <jfradkin@wazagua.com> writes: > I originally used the data_dir conf option to have my data on /pgslq/data, > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:23 AM
Tom Lane
 
Posts: n/a
Default Re: WHat foldsers in the data folder would I need to link to have my data on a different drive?

"Joel Fradkin" <jfradkin@wazagua.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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 01:24 AM
Joel Fradkin
 
Posts: n/a
Default Re: WHat foldsers in the data folder would I need to link to have my data on a different drive?

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@sss.pgh.pa.us]
Sent: Wednesday, February 16, 2005 10:37 AM
To: Joel Fradkin
Cc: pgsql-admin@postgresql.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@wazagua.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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com