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

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

Related

How to upgrade Postgresql 14.1 to 14.2 on Ubuntu 20.04?

Postgresql website says "A dump/restore is not required for those running 14.X." (https://www.postgresql.org/docs/14/release-14-2.html#id-1.11.6.5.4)
Do I still need to use pg_upgrade or there is any other way to upgrade?
You only need to update the binaries using Ubuntu's package manager and restart Postgres (apt update then apt install postgresql-14)
pg_upgrade is only needed to upgrade between major versions (e.g. from 13 to 14 or from 14 to 15). Upgrading 14.1 to 14.2 is a minor version upgrade.
As per the docs:
Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number.
You are moving from 14.1 to 14.2 so this applies to your situation. That means you can just upgrade the binaries (so usually apt-get update && apt-get upgrade assuming you are using a repo with the latest release) and restart the service. However, it is worth reviewing the release notes particularly:
some bugs have been found that may have resulted in corrupted indexes, as explained in the first two changelog entries. If any of those cases apply to you, it's recommended to reindex possibly-affected indexes after updating.

Change Postgresql version that Postgres.app uses

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

how to upgrade PostgreSQL 9.2.15 to 9.2.18 on a rhel6 linux server

We are using PostgreSQL 9.2.15 on our rhel6 linux server, and I want to upgrade to PostgreSQL 9.2.18.
Please let me know steps to upgrade minor versions in PostgreSQL.
I don't think that is possible.
Your best bet is probably to take the source RPM, replace 9.2.24 with 9.2.18 in the spec file, drop in the 9.2.18 source archive (which is available), and build your own RPM.
But, as has been mentioned in the comments, you should upgrade both databases to 9.2.24. Actually, you should upgrade to version 10.1 or 9.6.6.
Ignoring for now all the reasons why doing this is a bad idea
it's absolutely possible to upgrade to versions other than the latest, but first you will need a copy of the version you want to install
then you use your low-level package manager rpm -i packagefile or dpkg -i packagefile etc as apropriate...

postgresql-9.3-pljava-gcj for 64 bit architecture

I need to install pljava for postgresql 9.3 on Ubuntu 14.04. I installed the 64bit version of postgre using the apt-get packet manager of Ubuntu, and I tried installing pljava in the same way
sudo apt-get install postgresql-9.3-pljava-gcj
but it gives me the "unmet dependencies error"
The following packages have unmet dependencies:
postgresql-9.3-pljava-gcj:i386 : Depends: postgresql-9.3:i386 but it is not going to be installed
Apparently, there's no version of pljava for 64bit architectures of pljava for postgresql 9.3. Also searching the Web led me to this conclusion (https://launchpad.net/ubuntu/+source/postgresql-pljava/1.4.3-3 - see the "not build" versions of the packet).
Now, my problem is that I have to use a 64bit version of postgresql-9.3, and I definitely need pljava to embed some "java triggering" inside the db. Does anyone know any solution to this issue? Can I use pljava-9.1 with postgresql-9.3? Anything else?
Thanks a lot
There is no maintained PL/JAVA package for Ubuntu anymore. The package you mentioned is using a too old version of PL/JAVA, depending on gcj. It is highly recommended to use PL/JAVA version 1.5.0, using a recent Oracle or OpenJDK java version.
The sad news is you have to build it yourself. For instructions, see
https://tada.github.io/pljava/build/build.html (building)
https://tada.github.io/pljava/install/install.html (installing)
At the time this question was asked, it was true that there were not maintained PL/Java packages for Ubuntu.
Just to update the story, more recently there are. They can be found in the PGDG apt repository.

What is SRU in solaris? How to find the SRU number?

I used pkg list entire command , and i got the output for version column as follows :
0.5.11-0.175.1.0.0.24.2.
How to find the SRU from this?
Can we upgrade/ downgrade to a particular SRU ?
SRU is an abbreviation for Support Repository Update, installing new package versions from the support repo for that OS, much like installing a patch cluster for older Solaris releases.
The various fields in the version is explained in Oracle Solaris Package Versioning.
Oracle only makes SRUs available to customers with support contracts - if you have a support contract you can read more about SRU's in the Oracle Support Knowledgebase at Solaris 11 Support Repositories Explained, and see what fixes are available in each SRU for Solaris 11.1 and Solaris 11.2.
If you run 'pkg info entire' it will show the SRU name in human readable format also (if you have installed from the support repo - otherwise it shows the Release info). The 4th digit in 0.175.1.0.0.24.2 is the SRU number
In the example above it is the base Solaris 11.1 release - no SRU has been installed yet.
If an SRU had been installed on top of that you'd get a version like 0.5.11-0.175.1.21.4.1 (aka Oracle Solaris 11.1 SRU21.4.1)
You can easily upgrade to an SRU but you can't downgrade unless you have an older Boot Environment (BE) from which to upgrade to the SRU you want.