Subject: How to install specific postgres version / downgrade in Ubuntu

From: kamal deen <[email-masked]>
Date: Thu, 19 Sep 2024 15:29:51 +0530

Hi Team,

We have observed post OS patching one of our replica server got auto
upgraded from 15.7 to 15.8 in Ubuntu , we wanted to downgrade the postgres
version to match with our primary node.

( replic sync also not happening due this version mis match )

Pls advise.

Thanks in advance.

SK

---

From: Muhammad Usman Khan <[email-masked]>
Date: Thu, 19 Sep 2024 15:05:38 +0500

Hi,
I think the only solution is to:

Backup Your Data
Stop PostgreSQL
Uninstall PostgreSQL 15.8
Install PostgreSQL 15.7
Check Replication

---

From: kamal deen <[email-masked]>
Date: Thu, 19 Sep 2024 15:56:47 +0530

Thanks for your response,

I would like to get the exact commands to use.

SK

---

From: Zaid Shabbir <[email-masked]>
Date: Thu, 19 Sep 2024 15:31:11 +0500

> I would like to get the exact commands to use.

apt-cache showpkg postgresql-15
apt install <package-name>=<version>

Note: Before downgrade operation please make sure you take the proper
backup.

---

From: kamal deen <[email-masked]>
Date: Thu, 19 Sep 2024 16:38:29 +0530

Appreciate,  Thanks for your response.

SK

---

From: kamal deen <[email-masked]>
Date: Thu, 19 Sep 2024 16:38:47 +0530

SK