Subject: To uninstall or not to uninstall that is...

From: Arbol One <[email-masked]>
Date: Sat, 4 Jan 2025 06:08:58 -0500

Hello.
In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to 
upgrade to PostgreSQL-16. Should I first uninstalled PostgreSQL-15 and 
then install PostgreSQL-16 or is there a way to just do an upgrade?

Thanks.

-- 
*/ArbolOne ™/*
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing 
free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in 
progress [ í ]

---

From: "Peter J. Holzer" <[email-masked]>
Date: Sat, 4 Jan 2025 12:47:17 +0100

On 2025-01-04 06:08:58 -0500, Arbol One wrote:
> In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to upgrade to
> PostgreSQL-16. Should I first uninstalled PostgreSQL-15 and then install
> PostgreSQL-16 or is there a way to just do an upgrade?

How did you install it? Package from the Debian repo, package from the
PGDG repo or something else?

The packages from the repos are designed to be installed in parallel and
upgraded via pg_upgrade. There is a utility script "pg_upgradecluster"
to aid in this.

So the typical procedure is 

1) Install new version
2) Drop the new (empty) database
3) Invoke pg_upgradecluster (see man-page for details)
4) Check that everything is ok
5) Drop old database and uninstall old version.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | [email-masked]         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

---

From: "[email-masked]" <[email-masked]>
Date: Sat, 4 Jan 2025 12:43:24 +0000 (UTC)

I've installed PostgreSQL 12 and PostgreSQL 15 side-by-side in my Ubuntu Linux.  Both works fine till date.  
    On Saturday 4 January, 2025 at 04:39:30 pm IST, Arbol One <[email-masked]> wrote:  

Hello.
 In my Debian 12 machine, I have PostgreSQL-15 installed; I'd like to upgrade to PostgreSQL-16. Should I first uninstalled PostgreSQL-15 and then install PostgreSQL-16 or is there a way to just do an upgrade?
 
 Thanks.
 
 -- 
 ArbolOne ™ 
 Using Fire Fox and Thunderbird. 
 ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. 
 ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in progress [ í ]

---

From: Adrian Klaver <[email-masked]>
Date: Sat, 4 Jan 2025 08:29:40 -0800

> then install PostgreSQL-16 or is there a way to just do an upgrade?

Do you want to run both versions concurrently or do you want to move 
from 15 --> 16 and then drop the 15 instance?

-- 
Adrian Klaver
[email-masked]