Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run Postgres 8.4 and Postgres 9 on the same machine?

Tags:

postgresql

Is it possible to run Postgres 8.4 AND 9 at the same time (two installations)?

Thank you

like image 680
code-gijoe Avatar asked Jun 23 '11 14:06

code-gijoe


People also ask

Can I install 2 versions of PostgreSQL?

On local machines, it is a collection of databases that are managed by a single database server. Clusters allow us to install multiple versions of Postgresql on our macOS. To manage these clusters, we will be using a package called Postgresql Common.

Are PostgreSQL versions backwards compatible?

Upgrading. We always recommend that all users run the latest available minor release for whatever major version is in use. Major versions usually change the internal format of system tables and data files. These changes are often complex, so we do not maintain backward compatibility of all stored data.

Is PostgreSQL 11 backwards compatible?

Postgres 11 broke backward compatibility (columns proisagg and proiswindow are dropped from pg_catalog. pg_proc) This new column more clearly identifies functions, procedures, aggregates, and window functions.


1 Answers

Short answer: yes

Long answer:

You didn't specify your OS, so it's difficult to say how to do it. For example in Debian/Ubuntu you can just install second version from package (postgresql-8.4 and postgresql-9.0) and everything works out of the box (thanks to postgresql-common). On other systems you probably need to do it manually using "low level" commands such initdb and pg_ctl. Make sure that second installation (database cluster) uses different port (for example 5433) and not same data directory.

like image 82
Grzegorz Szpetkowski Avatar answered Oct 26 '22 01:10

Grzegorz Szpetkowski