I am using Homebrew to install PostgreSQL on my Mac mini server (Lion). However, I am unable to run the version I have installed, the only version I see running is the version installed with OS X:

216    83     1   0 12:17PM ??         0:00.47 /usr/bin/postgres -D /var/pgsql -c listen_addresses= -c log_connections=on -c log_directory=/Library/Logs -c log_filename=PostgreSQL.log -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%t  -c logging_collector=on -c unix_socket_directory=/var/pgsql_socket -c unix_socket_group=_postgres -c unix_socket_permissions=0770
216   266    83   0 12:17PM ??         0:00.27 postgres: logger process                           
216   300    83   0 12:17PM ??         0:01.01 postgres: writer process                           
216   301    83   0 12:17PM ??         0:00.75 postgres: wal writer process                           
216   302    83   0 12:17PM ??         0:00.51 postgres: autovacuum launcher process                           
216   303    83   0 12:17PM ??         0:00.91 postgres: stats collector process                           
1025  2698   814   0  1:30PM ttys000    0:00.00 grep post

How do I go about starting another postgres instance and having it run on startup?

  • I would highly recommend you post this at superuser.com. While this website focuses more on the use of Apple products, Superuser focuses more on answering questions regarding such advanced technical knowledge.
    – kevin9794
    Oct 1, 2011 at 7:15
  • As this is to do with Apple's install of postgres and how to control it I think this is on topic here (It would also be on topic on superuser we just have a large overlap)
    – mmmmmm
    Oct 1, 2011 at 12:19
  • How did you try to run it? Were there any errors? Does the log file say anything?
    – Ken
    Sep 18, 2012 at 1:29
  • Should this question have the [postgresql] tag?
    – user40661
    Feb 7, 2013 at 12:23

2 Answers 2


The Homebrew postgresql formula tells you exactly how to do this when you install it. Run brew info postgresql to have that information shown again.


postgres listens on a port - what is happening here is probably a conflict with the two postgreses claiming the same port.

To fix this you will have to stop the Apple supplied postgres from starting. From Server.app you have to stop the Device manager and Wiki from starting.

  • No, by default (and here, as evidenced by -c listen_addresses=), Apple's Postgres does not listen on a port. It listens on a Unix socket only.
    – Ken
    Sep 18, 2012 at 1:27
  • What you like to do, replace Apples PostgreSQL, run a developing instance ? All services on server need PostgreSQL to work and launch it if it needs it - also all scripts are designed for the default paths. So, tell us what you had done and what you plan to do ... which for your second postgres binary (I hope you know, that the brew PostgreSQL is launched as admin using a .plist). Jan 29, 2013 at 9:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .