After a reboot, postgres on my machine hasn't restarted. What command should I use in Terminal to get it going again?
|
feedback
|
migrated from stackoverflow.com May 5 '10 at 5:45
This question came from our site for professional and enthusiast programmers.
|
For restarts: To install postgres using port:
To launch on startup:
To start now:
To restart:
If you installed postgres using fink:
Here's more information on Postgres from Apple themselves: http://developer.apple.com/internet/opensource/postgres.html They show starting it with:
Obviously they logged in as postgres: | ||||
|
feedback
|
|
In 10.4 days it was...
Might still work. | |||||
feedback
|
|
Mac OS X uses a daemon called launchd that looks at a bunch of .plist configuration files and starts applications as needed (such as on startup, after a program dies, when a network port receives a request, when files are placed into a folder, and so forth.) Look halfway down this page for details on how to "Create a launchd Launch Agent" to automatically start postgres for you. The instructions look right for Tiger, Leopard, and Snow Leopard. (Beyond that, google for "postgres launchd"). [IIRC, when I found and downloaded postgres for my Mac, the installer created the launchd script for me.] | |||
|
feedback
|
|
Thanks @databyte. Just a quick heads-up: your restart command has a trailing oblique apostrophe, which will confuse the CLI if it is cut-and-pasted! Otherwise, thanks for the tip: seems to have worked for me! (I'd +1 your answer, but I don't have sufficient rep yet.) | |||
|
feedback
|
|
If you use macports to install postgresql, by default launching the postgres daemon is disabled and you need to run:
(or whatever the version it is)... To find out what the launch scripts are, run:
| ||||
|
feedback
|
|
If you installed postgres using homebrew, you need to use
| |||
|
feedback
|