FS#12432 - [postgresql] Specifying options to initdb in /etc/conf.d/postgresql

Attached to Project: Arch Linux
Opened by Sergey Samokhin (Myav) - Friday, 12 December 2008, 21:39 GMT
Last edited by Dan Griffiths (Ghost1227) - Thursday, 11 February 2010, 00:03 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Paul Mattal (paul)
Architecture All
Severity Low
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

It would be nice if we could specify options to initdb without having to edit /etc/rc.d/postgresql directly. Good way to do that is to define a variable (say INITOPTS) with options to inidb in /etc/conf.d/postgresql and use it then inside /etc/rc.d/postgresql:

## /etc/conf.d/postgresql
# ...
# It's just for example. By default the variably should be empty: INITOPTS=
INITOPTS='-W -A md5'
# ...

## /etc/rc.d/postgresql
# ...
su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data"
# ...

I beleive that specifying custom init options is common enough to have separate file with variable to use.

Current postgresql-8.3.5-1 package doesn't have such a feature.
This task depends upon

Closed by  Dan Griffiths (Ghost1227)
Thursday, 11 February 2010, 00:03 GMT
Reason for closing:  Implemented
Comment by Glenn Matthys (RedShift) - Friday, 12 December 2008, 22:35 GMT
Agreed, every rc.d script should have its configuration equivalent in conf.d.
Comment by Martin Imobersteg (bugix) - Wednesday, 24 June 2009, 09:06 GMT
Any updates on this?

INITOPTS='-E UNICODE' as default would be nice.
Comment by Fede (fedeb) - Tuesday, 29 September 2009, 13:16 GMT
Most of us using postgresql in arch have the same issue, most of the time about default locale for the cluster,
i think INITOPTS="--locale $LANG" would be even better.

Loading...