I have Postgres db instance 10.6 running in production say node-b: rhel 7.6 while I am building another cluster (not instance) of 2 nodes. Out of these 2 nodes one posgres node will reside on this machine. Somehow other node node-a has postgres 10.7 running there already for some more instances.

Is there a possibility to run 2 postgres minor version, in my case 10.7 and 10.6 on production machine node-b in parallel?

I tried testing it by installing from yum on node-b and found yum will override/change the existing installation. I am afraid it will kill the running postgres and hence did not proceeded further.

Off-course I can first upgrade node-b postgres production instance to 10.7 and then all-together can work on same version 10.7 across cluster but that I keep the last option. It has its own approval and all usual process track attached.

I recollect that it is a possibility to build from code (make,configure,install and ...) of particular version of 10.7 on node-b but I am not sure would it work as the underlying directory under /usr will still be same?

  • If you are comfortable compiling from source (which is an absolute breeze with PostgreSQL), then you can run as many versions of PostgreSQL as you like on the one machine - just make sure that you don't try and configure them to run on different ports. I've done this loads of times. However, I don't know what the story is for transferring the datadir between even minor versions. I'd be very wary of doing that. If I were you, I'd do a dump - or better yet, a copy of .csv (much faster). – Vérace Mar 17 '19 at 12:40
  • Thanks @Vérace . Yeah, I recollect I can configure the directories for binaries like in existing one /usr/pgsql-10/bin. I have to run them on different ports as I have each port running one db instance. I believe you were trying to mention that "you try.." rather "you don't try... ". Could you put some light on it . – user3792812 Mar 17 '19 at 13:23
  • Yes, indeed, my comment above should read "that you don't try and configure them to run on the same port" or (other way round) that "that you try and configure them to run on different ports" - good catch, thanks! – Vérace Mar 17 '19 at 13:41
  • It is possible, but kind of pointless and your package system might make life difficult for you to do this. You need special management approval to upgrade a bug fix release, but not to run unfixed software in parallel with fixed software on a production server? – jjanes Mar 17 '19 at 13:50
  • Thanks @Vérace..@jjanes, its not special permission but the standard change-management schedule is still 4 days away. I would need special change-management approval if I do it before that. You know its ordinary service base outsourcing giant with all big process talks... – user3792812 Mar 17 '19 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.