Prevent Postgresql from running at startup
Note that with PostgreSQL 9.0 (and probably newer) on Mac OS 10.6.8 (and probably older), in order to prevent the PostgreSQL server from auto-starting, you have to:
- Go to
/Library/LaunchDaemons/
- Open
com.edb.launchd.postgresql-9.0.plist
in an editor asroot
(replace9.0
with your correct version number), e.g.sudo vim com.edb.launchd.postgresql-9.0.plist
. - Locate the line
<key>RunAtLoad</key>
- Change the next line from
<true/>
to<false/>
- Save and exit.
That should do it. Also, if you want to stop the server immediately, without restarting, su
to postgres
and run /Library/PostgreSQL/9.0/bin/pg_ctl stop -D<your data dir>
. You can find out which is your current data dir with ps aux|grep postgre
.
Source: http://forums.enterprisedb.com/posts/list/2240.page#8321
This one worked for me
cd /Library/LaunchDaemons/
sudo rm com.edb.launchd.postgresql-9.0.plist
Found this:
In Mac OSX: (Assuming Default Locations)
Via uninstaller:
1) In the installation directory, there will be a uninstall-postgresql.app file will be there, executing (double clicking) that will uninstall the postgresql installation.
Manual Uninstallation:
1) Stop the server
sudo /sbin/SystemStarter stop postgresql-8.3
2) Remove menu shortcuts:
sudo rm -rf /Applications/PostgreSQL 8.3
3) Remove the ini file
sudo rm -rf /etc/postgres-reg.ini
4) Removing Startup Items
sudo rm -rf /Library/StartupItems/postgresql-8.3
5) Remove the data and installed files
sudo rm -rf /Library/PostgreSQL/8.3
6) Delete the user postgres
sudo dscl . delete /users/postgres