Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I start enterpiseDB PostgreSQL on Mac OSX 10.6.8?
    primarykey
    data
    text
    <p>Mac OSX 10.6.8</p> <p>The postgres website says postgres 9.2+ is compatible with Mac OSX 10.6+, so I downloaded the 9.2.4 version of the installer for Mac OSX here:</p> <p><a href="http://www.enterprisedb.com/products-services-training/pgdownload" rel="nofollow">http://www.enterprisedb.com/products-services-training/pgdownload</a></p> <p>I accepted all the defaults, so postgres was installed in the directory:</p> <pre><code>/Library/PostgreSQL/9.2 </code></pre> <p>(If you are installing postgres for rails development, in order to install the pg gem you need to add to your PATH: <a href="http://excid3.com/blog/installing-postgresql-and-pg-gem-on-mac-osx/#.UfkImuB6gy5" rel="nofollow">http://excid3.com/blog/installing-postgresql-and-pg-gem-on-mac-osx/#.UfkImuB6gy5</a>)</p> <p>Now, I am trying to figure out how to use postgres. I found a stackoverflow thread that said you can start postgres with this command:</p> <pre><code>~$ /Library/PostgreSQL/9.2/bin/pg_ctl start -D /Library/PostgreSQL/9.2/data -l postgres.log </code></pre> <p>But that produces this error:</p> <blockquote> <p>pg_ctl: could not open PID file "/Library/PostgreSQL/9.2/data/postmaster.pid": Permission denied</p> </blockquote> <p>If I try the same command with sudo:</p> <pre><code>~$ sudo /Library/PostgreSQL/9.2/bin/pg_ctl start -D /Library/PostgreSQL/9.2/data -l postgres.log </code></pre> <p>I get this error:</p> <blockquote> <p>pg_ctl: cannot be run as root Please log in (using, e.g., "su") as the (unprivileged) user that will own the server process.</p> </blockquote> <p>What the heck does that mean??</p> <p>Another SO thread says that in response to that error, you should do this:</p> <pre><code>$ sudo -u postgres bash </code></pre> <p>which produces this output:</p> <pre><code>Password: shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied bash: /Users/7stud/.bashrc: Permission denied bash-3.2$ </code></pre> <p>What's going on with the error there?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload