If you are not using PostgreSQL, it's unlikely that you will keep it updated. It is always the best practice to remove unnecessary utilities from your Mac to free up Mac storage space. The main reason for uninstalling PostgreSQL is that you won't be using this tool anymore. FAQs on how to uninstall PostgreSQL on Mac How to uninstall PostgreSQL on Mac with one click How to uninstall PostgreSQL using Terminal This article will explain how to completely uninstall PostgreSQL on Mac in 2 effective ways. If you have installed PostgreSQL on your Mac for a project but now you don't need it anymore, or you are experiencing issues with PostgreSQL, such as conflicts with your Mac system, it is advised to uninstall it. It is widely used by application developers to build applications ranging from small-scale web applications to large-scale enterprise systems. Once I created the directory manually and chown'd it, things started to work as they should.PostgreSQL, also known as Postgres, is a popular open-source relational database management system. Then I could get back into Rails-world and migrate the DB properly - I surmise that this means the homebrew installation step (perhaps the postinstall step that kept failing) wasn't creating the /usr/local/var/postgres directory as it should have, or it was trying with insufficient permissions to do so and failing silently. => Successfully started `postgresql` (label: ) => Successfully stopped `postgresql` (label: ) Pg_ctl -D /usr/local/var/postgres -l logfile start You can now start the database server using: auth-local and -auth-host, the next time you run initdb. You can change this by editing pg_hba.conf or using the option -A, or Initdb: warning: enabling "trust" authentication for local connections Performing post-bootstrap initialization. Selecting dynamic shared memory implementation. The default text search configuration will be set to "english".įixing permissions on existing directory /usr/local/var/postgres. The default database encoding has accordingly been set to "UTF8". The database cluster will be initialized with locale "en_US.UTF-8". This user must also own the server process. The files belonging to this database system will be owned by user "tyler". ➜ ~ sudo chown -R `whoami` /usr/local/var/postgres I've run these steps and postgresql has started working - I'll admit that this is a case of "better lucky than good" because I was just stabbing in the dark here - ➜ ~ sudo mkdir /usr/local/var/postgres Why does homebrew suggest running pg_ctl from /usr/local/var but postgres process does not exist here after fresh install? Why do I find it in /usr/local/bin ? Then when I try to launch from bin/ it's asking for the postmaster.pid file in bin/ but of course there is no postgres directory in bin/ as these are the processes themselves. Mkdir: /usr/local/bin/postgres: File exists Pg_ctl: could not open PID file "/usr/local/bin/postgres/postmaster.pid": Not a directory ➜ ~ pg_ctl -D /usr/local/bin/postgres start Pg_ctl: directory "/usr/local/var/postgres" does not exist UPDATE: it's starting to feel like /usr/local/var and /usr/local/bin have gotten confused by either me, homebrew, or the postgres cask because the error messages don't match the reality: ➜ ~ pg_ctl -D /usr/local/var/postgres start You can try again using `brew postinstall ideas? ➜ ~ brew postinstall Postinstalling The post-install step did not complete successfully You can try again using `brew postinstall postgresql` Warning: The post-install step did not complete successfully The only answer says "I ran the install script on the old installation" which means nothing to me - I tried brew postinstall imagining this to be what is meant by the "old installation" but I get the exact same result: ➜ ~ brew postinstall postgresql I have exactly the issue reported here. Or, if you don't want/need a background service you can just run: To have launchd start postgresql now and restart at login: Initdb -locale=C -E UTF-8 /usr/local/var/postgres This formula has created a default database cluster with: To migrate existing data from a previous major version of PostgreSQL run: Not any longer - there is something out of whack and I don't know how homebrew works well enough to troubleshoot this. I've had instances with this machine where I see "Mac OSX restarted due to a problem" and usually there is a stale postmaster.pid file that I can delete and restart postgresql and everything is fine. I've never had an issue like this before - normally brew install postgres works and everything is fine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |