From: | Edson Richter <edsonrichter(at)hotmail(dot)com> |
---|---|
To: | "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org> |
Subject: | RES: Switch PG Versions |
Date: | 2021-03-05 00:38:21 |
Message-ID: | CP2P152MB04038AAF3D953BEA5FFD4E50CF969@CP2P152MB0403.LAMP152.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Exactly what I said: I was just being enfatic about the risk.
From OP, I felt he wants to interchange installs (in my mind, by using same data directory).
It’s ok to do that, being careful of not sharing data files.
But your explanation made all clear.
Regards,
Edson
Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
De: richard coleman<mailto:rcoleman(dot)ascentgl(at)gmail(dot)com>
Enviado:quinta-feira, 4 de março de 2021 18:38
Para: Edson Richter<mailto:edsonrichter(at)hotmail(dot)com>
Cc:pgadmin-support lists.postgresql.org<mailto:pgadmin-support(at)lists(dot)postgresql(dot)org>
Assunto: Re: Switch PG Versions
Edson,
Of course not. What you can do is install multiple versions of postgreSQL in parallel (I've done it on Windows and Ubuntu Server). It's why they are each put into their own version numbered directory. For example, a Windows machine running versions 10, 12, and 13 would have a default file structure like this;
C:\Program Files\PostgreSQL\10\... (various folders including data, where your database data resides)
C:\Program Files\PostgreSQL\12\... (various folders including data, where your database data resides)
C:\Program Files\PostgreSQL\13\... (various folders including data, where your database data resides)
As you can see, as long as the data folders for each postgreSQL version are kept in different locations and you are running postgreSQL on different ports, you can run as many copies of postgreSQL in parallel as you have resources (hard drive space, memory, CPU, etc.). Things only get tricky when you want to run multiple instances of the same version of postgreSQL on the same machine for some reason. In this case you would have to deviate from the default folder structure. If you wanted to run three copies of postgreSQL 13 on the same machine in parallel then something like this would do;
C:\Program Files\PostgreSQL\13\... (various folders including data, where your database data resides)
C:\Program Files\PostgreSQL\13a\... (various folders including data, where your database data resides)
C:\Program Files\PostgreSQL\13b\... (various folders including data, where your database data resides)
Of course, you would need to go back through your configuration files to make sure they matched your alternative layout. You would also still need to be running them on different ports.
I hope that helps,
rik.
On Thu, Mar 4, 2021 at 4:03 PM Edson Richter <edsonrichter(at)hotmail(dot)com<mailto:edsonrichter(at)hotmail(dot)com>> wrote:
Yes it’s possible to do as Richard noticed. But you cannot share at any chance the data folder!
This will corrupt your data making irrecoverable.
Even not having two versions online, you cannot shutdown version 10 and startup version 12 (or any combination of major versions) on same data folder – this will lead to data loss.
Regards,
Edson
Enviado do Email<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
De: Richard Brockie <richard(dot)brockie(at)gmail(dot)com<mailto:richard(dot)brockie(at)gmail(dot)com>>
Enviado: Thursday, March 4, 2021 5:49:05 PM
Para: pgadmin-support lists.postgresql.org<http://lists.postgresql.org> <pgadmin-support(at)lists(dot)postgresql(dot)org<mailto:pgadmin-support(at)lists(dot)postgresql(dot)org>>
Assunto: Re: Switch PG Versions
Hi Jack,
I was in a similar situation with an old application using pg v9. I installed different versions of postgres with homebrew on Catalina. I currently have versions 9, 11 & 12 installed and can have them all running in parallel listening on different ports. I connect to them all from a single instance of pgAdmin4 over their respective ports. Testing the application with the new pg version is also just a port change in the configuration. It works very well.
Best wishes,
R.
On Thu, Mar 4, 2021 at 11:52 AM Jack Royal-Gordon <jackrg(at)pobox(dot)com<mailto:jackrg(at)pobox(dot)com>> wrote:
I’m using the EDB PG installation on Mac OS 11.1 (Big Sur), which seems to offer multiple versions. I’m currently running PG10, but I’m looking to upgrade to PG13 and would like to test with it first. Can I (and if so then how do i) switch back and forth between PG versions?
--
R.
Richard Brockie
Real-time bicycle race management - www.ontheday.net<http://www.ontheday.net>
From | Date | Subject | |
---|---|---|---|
Next Message | Jack Royal-Gordon | 2021-03-05 01:58:26 | Re: Switch PG Versions |
Previous Message | Dave Page | 2021-03-04 23:29:17 | Re: Switch PG Versions |