Re: Postgresql service using a different data directory

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

 



Aubrey Barnard wrote:
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?)

All that you need to do is edit /etc/sysconfig/pgsql/postgresql and add one line:

PGDATA=/data/pgsql

That's it.  You don't need to worry about the log.

The init script itself will be overwritten by updates, so you don't want to modify that. The file in /etc/sysconfig/pgsql won't be.

--
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