My Rec ommendation for DBeaver. My Recommendation for DBeaver. Because the PostgreSQL Operator command line pgo is written in Go, Crunchy Data compiles native binaries for Windows, Mac, and Linux meaning it is really easy to run on your local machine. And this client library is all you need to use the Postgres Operator.
I started off programming Ruby on Rails applications on a Windows machine with an Ubuntu virtual machine running on top. But when I got my first job at a startup in California, I received a brand new shiny Macbook laptop.
I had never used a Mac before as I considered them overpriced relative to a desktop I could setup with Linux. But since that’s what I was given, that’s what I was used. One of the first things I had to do is figure out how to get Postgres up and running.
Eventually, I had to learn a good way to upgrade it as well. At my first job, I found that using Heroku’s Postgres app. At my next job, I used the homebrew package manager since that’s how our team used it.
So what follows is a mini-guide I put together on how to install postgresql on Mac as well as how to upgrade it with homebrew.
Now if you want to use Heroku’s Postgres app, it’s pretty easy and is a good alternative to homebrew.
This guide assumes that you have homebrew installed. If you don’t, you can find some instructions here.
Once you do that, all you have to do is issue the following command in your terminal:
See image below!Run Visio setup installationOnce the above dependency packages installed and configured, we are ready to run the installation. Install them using winetricks as follows: env WINEPREFIX=/.visio2007 winetricks gdiplusenv WINEPREFIX=/.visio2007 winetricks msxml6env WINEPREFIX=/.visio2007 winetricks dotnet20env WINEPREFIX=/.visio2007 winetricks riched20env WINEPREFIX=/.visio2007 winetricks corefontsCapture example of installing.Net Framework (dotnet20) is as in image below:After installing the packages above, then run Wine configuration editor (winecfg) env WINEPREFIX=/.visio2007 winecfgIn Wine configuration, under Libraries tab make sure that gdiplus, msxml6, riched20 are set to native. Those packages are gdiplus, msxml6, dotnet20, riched20, and corefonts. Microsoft office for mac visio.
$ brew install postgres
It should install the latest version of Postgres available via Homebrew. Pretty easy, right?
Ok, so let’s say you have to upgrade postgres. I had to follow these steps when I was upgrading to Postgres 9.6
The first step is to turn off the postgres service if it’s running in the background. Format wd passport for mac.
$ brew services stop postgresql
Next, we’ll use homebrew to upgrade it to the latest version.
$ brew update && brew upgrade postgresql
Finally, we’ll switch to the new version using the following command.
brew switch 9.6.1
You’ll see output like the following:
Now to ensure postgres starts automatically every time you start your Mac, you’ll need to do some extra setup.
I got the following setup from this blog post at tunnelsup.
Create the directory ~/Library/LaunchAgents if it doesn’t exist already.
There’s a plist file that comes with the postgres install from homebrew.
When upgrading to 9.6.2, my plist was at /usr/local/Cellar/postgresql/9.6.2/homebrew.mxcl.postgresql.plist.
Copy the plist file to the LaunchAgents directory.
cp /usr/local/Cellar/postgresql/9.3.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
Now use launchctl to load the file using this command:
$ launchctl load -w homebrew.mxcl.postgresql.plist
You can also use a ruby gem called lunchy. I haven’t tried it but this blog post describes the process.
The following command will show you if you have multiple versions of postgres installed.
$ brew info postgresql
This troubleshooting gist describes how to migrate data from one version of Postgres to another.
This part gives you some common troubleshooting tips if you’re a Rails developer.
Since I primarily use Postgres for Ruby on Rails work, when I was upgrading I had a connection issue described below.
WARNING: Before you issue the following commands, please make sure you back up your old local Postgres data if you need it. See the gist referenced in the General Troubleshooting Tips And Useful Commands section.
$ rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -E utf8
After running the above rm and initdb commands, you should see something similar to the following.
If you want to install Postgres via homebrew, follow the steps above. Make sure you backup your local data if you need it so you don’t accidentally erase something you need to keep. Other than that, let me know if you have any issues in the comments.
Well, pgAdmin is great for its feature-richness. However, I found its UI is clumsy and complicated. I know there is a list of PostgreSQL GUI Tools. However, they are either web-based, Java-based* or don't support the features I want. In the good old MySQL world, my favorite client is Sequel Pro, but its support for PostgreSQL doesn't seem to be happening. So, I decided to make one myself.
* No offense to the Java community. I am a Java developer myself and I like JVM a lot. I just dislike Java desktop apps personally.
No. There is no plan to open source it at this moment.
No, PSequel is written from scratch in Swift 2, although PSequel's UI is highly inspired by Sequel Pro.
I am developing PSequel in my spare time. By supporting macOS 10.10+ only, I can keep the codebase simpler and save time by not testing it in older versions of macOS. And, less code, less bugs.
PSequel is still in its early stage. My plan to implement most features in Sequel Pro. If you think a feature is important, please let me know and I'll adjust its priority based on its popularity.
Use Github issue tracker. Please try not to create duplicate issues. If you are reporting multiple bugs or suggesting multiple features, please create separate issues for each bug/feature. Please include your macOS, PostgreSQL and PSequel versions when reporting a bug. If you don't have a Github account, you could report bugs here.
If you like PSequel, please report bugs and/or help spread the word.