From: | Scott Frankel <frankel(at)circlesfx(dot)com> |
---|---|
To: | A(dot)M(dot) <agentm(at)themactionfaction(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: restart server on Lion |
Date: | 2012-01-30 22:03:44 |
Message-ID: | 607A3AF1-635F-45BC-9B5B-58B518E73148@circlesfx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi M,
On Jan 30, 2012, at 11:46 AM, A.M. wrote:
>
> On Jan 30, 2012, at 2:40 PM, Scott Frankel wrote:
>
>>
>> Hi all,
>>
>> What's the best/correct way to cause the PostgreSQL server to startup automatically when rebooting on OSX 10.7 Lion?
>>
>> I'm using a macports install of postgres 8.4 and went through a couple grueling days, sudo'd up to my eyeballs, to restore the postgres user and have a working installation.
>>
>> To start the service, I'm currently invoking this on the cmd-line:
>>
>> sudo su postgres -c "/opt/local/lib/postgresql84/bin/pg_ctl -D /opt/local/var/postgresql84/defaultdb -l /opt/local/var/postgresql84/defaultdb/data/logfile.txt start"
>>
>> That's pretty cumbersome for each reboot. I've also seen references to manually invoking this on the cmd-line:
>>
>> sudo serveradmin start postgres
>>
>> But that yields "postgres:error = "CANNOT_LOAD_BUNDLE_ERR"
>>
>> Is there an /etc or OSX-specific solution people are using for restarts? My PG 8.3 server restarted automagically on OSX 10.5. While I don't recall setting up anything specifically to make that happen, memory fades...
>
> MacPorts includes a launchd plist to handle this. (Perhaps "launchd" is the keyword you need to search.)
Aha! Nice to know which tree to bark up ;)
> /Library/LaunchDaemons/org.macports.postgresql90-server.plist (for PostgreSQL 9.0, of course)
> http://od-eon.com/blogs/calvin/os-x-lion-postgresql/
I installed macports: postgresql84 @8.4.10_0 and there's no trace of a postgres launch daemon plist file having been installed on my machine. My best guess at this point is that the plist file may only come with the postgresql84-server @8.4.10 port.
I'll test that theory tomorrow and keep this list posted.
Thanks!
Scott
>
> You can adjust the script to your liking.
>
> Cheers,
> M
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2012-01-30 22:20:24 | Re: pg_dump -s dumps data?! |
Previous Message | Marko Kreen | 2012-01-30 21:47:17 | Re: Lock/deadlock issues with priority queue in Postgres - possible VACUUM conflicts |