Change Postgresql version that Postgres.app uses - postgresql

When I use Postgres.app, it uses version 9.6.
I have version 10.5 installed as well (via Homebrew) on my computer and want to use that instead.
When clicking on the + sign in the sidebar to "Create new server" I only get a dropdown with versions 9.5, 9.6 and 10.
How do I instruct Postgress.app to use 10.5?

The version you installed with brew is in a different $PATH. It is an independent installation from the one you installed with Postgres.app

You would have to install the corresponding version of the app which supports your required version from this link, in your case last option might work. https://postgresapp.com/downloads.html

Related

delete postgresql server from mac

I installed postgresql server on mac with brew install postgres because I want to practice it but it seems I installed the wrong thing? What I need is to run the installer from the official website ?
I cannot find how to uninstall the postgresql server
What you have installed was correct. But if you want to install .dmg package of postgres then you can do that as well.
First, uninstall the current version of Postgres by using
brew uninstall postgres
and then Navigate to the following below URL to get your desire Postgres .dmg package
offical Postgres .dmg for mac
Disclosure: I work for EnterpriseDB (EDB), we create and certify the Mac installers for all supported PostgreSQL versions.

How can I downgrade to a lower version of PostgreSQL on OSX

I'm working on an app that is only compatible with postgreSQL 9.4.5 and my current version is 9.5.2
Is there any way to download the older version? I can't seem to find it.
I found older versions here but they're meant for Solaris.
The answer in https://stackoverflow.com/a/31261608/1949363 describes in great detail how to do a downgrade. Does it work for you?
In terms downloading old versions, 9.4 is available on brew
$ brew search postgresql#9.4
postgresql#9.4

How to upgrade the centos 5.8 to centos 6X?

I am using centos 5.8 in xencenter , i need to upgrade to centos6.5.
i tried with yum update it will updated to centos 5.10 only,please any one help me.
Thanks,
Prasad
I am guessing that you are trying to update a virtual machine. If this is the case then you can try the following.
Boot your CentOS 5.8 VM using the CentOS6 ISO
On the initial screen press tab
when the boot command appears, append upgradeany
vmlinuz initrd=initrd.img upgradeany
When you pass the language and devices selections and the system is done examining the storage, you will be prompted if you want to upgrade an existing installation and be shown a drop down list of versions that were found.

Does PostgreSQL exist on OS X Mavericks?

I knew there was a version of PostgreSQL installed on OS X Mountain Lion and if you want to work with this database engine you must install a new version and make some changes (http://nextmarvel.net/blog/2011/09/brew-install-postgresql-on-os-x-lion /). I didn't do this at that time because it was not necessary for me.
Now I have my Mac with OS X Mavericks (clean install) and if I run psql -- version as can be seen in this article (http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x), the terminal tells me that there is no such command.
~ ยป psql --version
zsh: correct 'psql' to 'sl' [nyae]? n
zsh: command not found: psql
Does PostgreSQL get installed by default when I do a clean install of OS X Mavericks?
If i want to try PostgreSQL on Mavericks, do I just need to run brew install postgresql and it`d be OK?
Has anyone tried this?
Thank you very much.
Yes, it should be safe to brew install postgresql, provided brew doctor indicates no problems.
My preferred approach is always to leave OS X builtins untouched, and use Homebrew to install separate versions of everything I'd like to work with. I've tried using OS X builtins in the past, and things have a way of getting messy in a hurry, especially when updating OS X.
For everyone who is looking for guide about how to install and configure postgres on the fresh Mavericks installation: http://marcinkubala.wordpress.com/2013/11/11/postgresql-on-os-x-mavericks/
I hope it will be helpful.
You can download different versions of PostgreSQL from Apple.
Also for a development environment you can use Postgres.app (http://postgresapp.com/):
Postgres.app is a simple, native Mac OS X app that runs in the menubar without the need of an installer. Open the app, and you have a PostgreSQL server ready and awaiting new connections. Close the app, and the server shuts down.
[http://www.postgresql.org/download/macosx/ ]

How to fix pg_dump version mismatch errors?

When trying to get local data to Heroku, I am encountering a version mismatch between two different versions of pg_dump.
Specifically, I am getting this message:
pg_dump: server version: 9.2.2; pg_dump version: 9.1.4
pg_dump: aborting because of server version mismatch
I have found others with this problem, but do not know enough to implement the proposed solutions. (I am new to Ruby on Rails, PostgreSQL, Heroku, and the Mac! Very much at the stage of playing around the picking things up as I go.)
I was thinking I might simplify my life if I uninstalled all PostgreSQL on my local machine and started again with a clean install of PostgreSQL 9.2.2 from http://postgresapp.com/, but I don't know how to go about doing the uninstall.
I'm running Mac OS X Mountain Lion 10.8.2.
OS X 10.8 comes with pg_dump version 9.1.4 in the /usr/bin directory, along with psql and other programs that are client-side PostgreSQL tools. It does not mean that PostgreSQL as a server is installed (unless you have OS X Server Edition).
So you don't have to uninstall PostgreSQL because it's not installed and it's better not to remove these postgres client tools in /usr/bin because they belong to the system as shipped by Apple. They just need to be side-stepped.
The package provided by postgres.app comprises both the PostgreSQL server and the client-side tools of the same version as this server. These tools get installed in /Applications/Postgres.app/Contents/MacOS/bin
To use these instead of the 9.1 ones from Apple when you work in a Terminal, postgres.app documentation says to do:
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
and put it in your .profile file.
Once you have done that and you run pg_dump, you should no longer get the error that's it's the wrong version, because it would be the one that ships with postgres.app (currently 9.2.2).
I have this setup and it works OK for me.
If you only need to upgrade your pg_dump to the latest version and you have homebrew and mac, if the app has the latest version and your local pg doesn't:
brew upgrade postgresql
If you're using postgresapp 9.3.x, the path is different. The following worked for me (courtesy of http://sigmyers.com/blog/2013/3/12/postgres-pgdump-version-mismatch-error-postgresapp-postgresappcom)
export PG_BIN_PATH="/Applications/Postgres.app/Contents/Versions/9.3/bin/"
PATH=$PG_BIN_PATH:$PATH
Check here for the latest path: http://postgresapp.com/documentation/cli-tools.html
I'm running Mountain Lion Server. My PostgeSQL server is at version 9.2.1 and the default tools are at 9.1.5.
I had to use:
PATH="/Applications/Server.app/Contents/ServerRoot/usr/bin:$PATH"
to make it work.
Yep, sometimes if you run Postgres.app this may happen after upgrade. Make sure you restart your Postgres.app - it will update your PATH.
In my case I have postgresql installed via homebrew and the executables are here: /usr/local/opt/postgresql#9.6/bin
Or you copy the dump and restore executions to the /Applications/Postgres.app/Contents/SharedSupport folder
or in PdAgmin you point the PG bin Path (in properties -> binary Path) to the path of the executables of your postgre