Hello, Today I was told that having rc.d/init.d scripts run initdb as a part of start (in case a database has not been initialized) is a seriously bad idea. I figured it was merely a precaution to guard against a theoretical problem. Interested parties should read this thread (it's actually really interesting to see the detective work being done): http://archives.postgresql.org/pgsql-hackers/2004-12/msg00479.php Apparently, there are at least two such examples, so it's not just a theoretical problem. I suggest changing the pgsql rc.d script from: [---] pgsql_precmd() { if [ ! -d ${pgsql_home}/data/base ]; then pgsql_initdb fi } [---] ... to ... [---] pgsql_precmd() { if [ ! -d ${pgsql_home}/data/base ]; then echo "<A note about having to run dbinit first>" return fi } [---] I don't think requiring administrators to run "/etc/rc.d/pgsql dbinit" (Or wherever it's kept) manually once after an install will ruin anyones pkgsrc experience. But I'm certain that anyone running in to a problem which stems from from dbinit being run implicitly from start will come down with a serious case of unhappiness. -- Kind regards, Jan Danielsson
Attachment:
signature.asc
Description: OpenPGP digital signature