Postgresql service using a different data directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Helpful Fedora users,

Summary:
I would like to have Postgres (as a service) use a different data
directory instead of the default /var/lib/pgsql/data, but I am not sure
how to do this.

Problem:
Is there a way to have Postgres use a different data directory short of
editing /etc/rc.d/init.d/postgresql and changing the default setting of
PGDATA? I noticed that /etc/rc.d/init.c/postgresql looks to files in
/etc/sysconfig/pgsql, but I don't have any files there to guide
editing/additions and I cannot find documentation on the subject. However,
I presume adding a file to /etc/sysconfig/pgsql is the best way to go. Can
someone confirm and explain this? (E.g. would I also need to specify
PGLOG? Is it important to back up the log?)

Background:
I would like Postgres to use /data/pgsql/data as the data directory
instead of /var/lib/pgsql/data. /data is a RAID array for me and is also
easier to use than selectively backing up parts of /var. The Postgres
documentation does not cover this aspect of the configuration as it is
OS-specific configuration of services. Searching the internet has not been
helpful either. I already reconstructed my database in my desired location
and can access it when explicitly running postgres and specifying the data
directory. However, running postgres as a service defaults to using
/var/lib/pgsql/data, which is not what I want.

I would really appreciate any help and advice on this problem.

Aubrey


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux