- Knowledge Base
- Admin
- Database Administration
How do I stop the PostgreSQL service on a Mac?
When installing xTuple ERP on a Mac, you may run into an issue if you have a previous instance of PostgreSQL running. If you get an error message during the installation that says:
"There has been an error. There is not enough shared memory. PostgreSQL component requires a minimum shared memory segment of 32MB. Please increase "shmmax" kernel parameter (in /etc/sysctl.conf) or close any other PostgreSQL instances before restarting installation."
You can use the Terminal application on Mac OS X to run commands to stop the database service. You'll give yourself Superuser privileges, then switch yourself to the postgres user, then stop the service.
- Make sure you've closed all connections to the postgres database, such as pgAdmin or xTuple.
- Go to Terminal (It's in Applications/Utilities)
- Type: sudo su -
- Enter the password you use to login to your Mac
- Type: cd /Applications/xTuple/postgresql/bin/ (assuming you installed xTuple in the default directory. If not, you'll need to change the path to where you installed it).
- Type: sudo -u postgres ./pg_ctl -D /Applications/xTuple/postgresql/data stop
- You can start up the database in the same way, using the start command: sudo -u postgres ./pg_ctl -D /Applications/xTuple/postgresql/data start