Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Every time I restart my Mac OS X Version 10.8.3. and open PSQL Version 9.2.4.3 (14), the PSQL terminal appears for a second and then shuts down.

Below is the info from the docs http://postgresapp.com/documentation

Uninstalling

What I do to remedy the problem is type these 3 lines of code in bash: open ~/Library/Application\ Support/Postgres --> I delete the Var folder sudo sysctl -w kern.sysv.shmall=65536 sudo sysctl -w kern.sysv.shmmax=16777216

When I restart PSQL, it works. The problem I have an empty database. All my work is gone. How can I get PSQL running permantely so that I do not have to restart with an empty database?

share|improve this question
    
I don't know if this is an option for your, but Postgres 9.3 "fixed" this problem by requiring much less System V shared memory. –  a_horse_with_no_name Nov 2 '13 at 9:25
add comment

migrated from stackoverflow.com Oct 3 '13 at 8:26

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 0 down vote accepted

Put those values in /etc/sysctl.conf and they will be read on boot

Mine is:

[codyc:~]$ cat /etc/sysctl.conf
kern.sysv.shmmax=1073741824
kern.sysv.shmall=1073741824
share|improve this answer
    
What is /etc/sysctl.conf and how do i navigate to it will bash prompt? I'm assuming once I am inside that folder in can copy and paste your code: –  user2449984 Oct 2 '13 at 20:03
    
/etc/sysctl.conf is a plain text file - the cat command displays the contents of the file. Edit or create the file and enter the values you want to use. sysctl.conf is a system configuration file - for more info try man sysctl.conf –  sambler Oct 4 '13 at 10:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.