Specifying PostgreSQL data on startup

Bryan Blackburn blb at macports.org
Thu May 28 12:57:34 PDT 2009


On Thu, May 28, 2009 at 02:42:44PM -0400, Alexy Khrabrov said:
> I'd like to use the startup scripts for PostgreSQL 8.3 server, in
>
> /opt/local/etc/LaunchDaemons/org.macports.postgresql83-server
>
> with Lingon: http://tuppis.com/lingon/
>
> Now the scripts allow for an environment variable to specify where your 
> data is:
>
>        su postgres -c "${PGCTL} -D ${POSTGRESQL83DATA:=/opt/local/var/ 
> db/postgresql83/defaultdb} start -l /opt/local/var/log/postgresql83/ 
> postgres.log"
>
> However, it the server is started on boot, where does $POSTGRESQL83DATA 
> come from?

Note that the ${POSTGRESQL83DATA:=/opt/local/var/db/postgresql83/defaultdb}
is an either/or; if POSTGRESQL83DATA is defined use it, otherwise use that
path.  I don't see POSTGRESQL83DATA being defined anywhere so it's falling
back to that hardcoded path.

If you need to set it you should be able to so with the launchd plist, but
note that any changes to it are going to be lost the next time you upgrade
the postgresql83-server port.

Bryan


>
> Cheers,
> Alexy


More information about the macports-users mailing list