mercoledì 26 ottobre 2011

Using different Postgresql version on the same Ubuntu machine

I'm used to have an Ubuntu 10.04 where do software tests in order to add they, some times later, in my production machine.
I'm using a Postgresql 8.4 DBMS in order to store datas and other things, but I was curios to install and test the new Postgresql 9.x.

Thanks to this post I've installed very quickly Postgresql 9 to the machine, without removing the "old" Postgresql 8, which contained all the data.
In order not to stop using all the apps I needed, I changed the Postgresql 9 default port:
/etc/postgresql/9.0/main/postgresql.conf:port = 5433
Rebooting the machine both Postgresql services started correctly and adding the "-p ####" or "--port=####" option at the end of pg* command I was able to connect with both DBMSes

Eventually take a look at pg_wrapper (postgresql-common and postgresql-client-common Ubuntu package)in order to call the correct version of the DBMS you're invoking.
Posta un commento