FS#4435 - postgresql init script should have configurable data dir

Attached to Project: Arch Linux
Opened by Alec Thomas (alecthomas) - Tuesday, 11 April 2006, 05:34 GMT
Last edited by Paul Mattal (paul) - Sunday, 30 December 2007, 17:59 GMT
Task Type Feature Request
Category Packages: Current
Status Closed
Assigned To Paul Mattal (paul)
Architecture All
Severity Very Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It would be good if the Postgresql data directory were configurable through /etc/conf.d/postgresql rather than being hard coded into the rc script.
This task depends upon

Closed by  Paul Mattal (paul)
Sunday, 30 December 2007, 17:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 8.2.5-2. Thanks for the patches!
Comment by Miguel Manuel Melendez Gomez (miguelmmg) - Wednesday, 22 November 2006, 01:21 GMT
Yes. Like mysql package do. It's useful to relocate data dir between partitions or selecting another location without changing rc script cause next upgrade restore configuration. Please, this is a useful change.
Comment by Allan McRae (Allan) - Saturday, 08 September 2007, 11:24 GMT
The data directory can be defined in the $PGDATA environmental variable making this unnecessary.
Comment by Alec Thomas (alecthomas) - Saturday, 08 September 2007, 13:46 GMT
This won't suffice, as /etc/rc.d/postgresql explicitly uses "pg_ctl -D /var/lib/postgres". From the man page:

-D datadir
Specifies the file system location of the database files.
If this is omitted, the environment variable PGDATA is
used.
Comment by Corrado Primier (bardo) - Sunday, 16 December 2007, 01:20 GMT
What about adding /etc/conf.d/postgresql with the configuration values?
Comment by Allan McRae (Allan) - Sunday, 16 December 2007, 02:26 GMT
This adds /etc/conf.d/postgresql which specifies the data directory. Updated pkgbuild with added backup line. Also fixes  FS#5297 

Loading...