Обсуждение: Update postgresql via offline mode

Поиск
Список
Период
Сортировка

Update postgresql via offline mode

От
Mahendra Singh
Дата:
Dear Experts,

Need your expertise here..! 

I want to patch my postgresql minor version to the latest minor version.
How can I do so via offline mode? No need to enable the internet on the postgresql server. 
Please advise and suggest a simple and easy solution. 
Like in Oracle or MSSQL servers, just download the update from the internet and install on the server.

Regards,
Mahendra Singh
DBA@DXB

R: Update postgresql via offline mode

От
Gianfranco Cocco
Дата:
Hi,
You can download from repository https://download.postgresql.org/pub/repos/yum/ the software that you need and transfer them to your server.
After that you can shutdown postgreSQL instance and launch the upgrade:

For example:

dnf install \
   postgresql1xxxPGDG.rhelxx.x86_64.rpm \
   postgresql1x-server-1x.x-1PGDG.rhelxx.x86_64.rpm \
   postgresql1x-libs-1x.x-1PGDG.rhelx.x.x86_64.rpm \
   .....rpm                    \
   .....rpm                    \
      --allowerasing

--allowerasing ==> replace only binaries related to the same family. 
 

Good work.
Regards,

Gianfranco
Gianfranco Cocco
​vargroup.com
Questo messaggio è stato spedito da Var Group S.p.A. o da una delle
​aziende del Gruppo. Esso, e gli eventuali allegati, potrebbero contenere
​informazioni di carattere estremamente riservato e confidenziale.
​Qualora non foste i destinatari designati, vogliate cortesemente
​informarci immediatamente con lo stesso mezzo ed eliminare il
​messaggio e i relativi eventuali allegati, senza trattenerne copia.
 

Da: Mahendra Singh <msmahendrasingh18@gmail.com>
Inviato: mercoledì 15 aprile 2026 09:05
A: pgsql-admin <pgsql-admin@lists.postgresql.org>
Oggetto: Update postgresql via offline mode
 
Dear Experts,

Need your expertise here..! 

I want to patch my postgresql minor version to the latest minor version.
How can I do so via offline mode? No need to enable the internet on the postgresql server. 
Please advise and suggest a simple and easy solution. 
Like in Oracle or MSSQL servers, just download the update from the internet and install on the server.

Regards,
Mahendra Singh
DBA@DXB
Вложения

Re: Update postgresql via offline mode

От
Holger Jakobs
Дата:
Am 2026-04-15 09:05, schrieb Mahendra Singh:
> Dear Experts,
> 
> Need your expertise here..!
> 
> I want to patch my postgresql minor version to the latest minor
> version.
> How can I do so via offline mode? No need to enable the internet on
> the postgresql server.
> Please advise and suggest a simple and easy solution.
> Like in Oracle or MSSQL servers, just download the update from the
> internet and install on the server.
> 
> Regards,
> Mahendra Singh
> DBA@DXB

Hi Mahendra,

This depends heavily on your platform and how you have installed your 
PostgreSQL initially.

Please tell us the details. Is it Windows, Linux, Mac? Did you install 
via your package manager? Did you use the PostgreSQL repos or those 
provided by the distribution? Or did you use an installer by EDB?

Then we might be able to help.

Kind Regards,
Holger




-- 
--
Holger Jakobs, 51469 Bergisch Gladbach, Tel. +49 178 9759012



Re: Update postgresql via offline mode

От
Mahendra Singh
Дата:
Dear Holger,

Yes, it is a linux server, used repos initially for installation.

Now, we want to upgrade PostgreSQL to latest minor version. 

On Wed, Apr 15, 2026 at 12:59 PM Holger Jakobs <holger@jakobs.com> wrote:
Am 2026-04-15 09:05, schrieb Mahendra Singh:
> Dear Experts,
>
> Need your expertise here..!
>
> I want to patch my postgresql minor version to the latest minor
> version.
> How can I do so via offline mode? No need to enable the internet on
> the postgresql server.
> Please advise and suggest a simple and easy solution.
> Like in Oracle or MSSQL servers, just download the update from the
> internet and install on the server.
>
> Regards,
> Mahendra Singh
> DBA@DXB

Hi Mahendra,

This depends heavily on your platform and how you have installed your
PostgreSQL initially.

Please tell us the details. Is it Windows, Linux, Mac? Did you install
via your package manager? Did you use the PostgreSQL repos or those
provided by the distribution? Or did you use an installer by EDB?

Then we might be able to help.

Kind Regards,
Holger




--
--
Holger Jakobs, 51469 Bergisch Gladbach, Tel. +49 178 9759012

Re: Update postgresql via offline mode

От
Holger Jakobs
Дата:
Am 2026-04-15 12:57, schrieb Mahendra Singh:
> Dear Holger,
> 
> Yes, it is a linux server, used repos initially for installation.
> 
> Now, we want to upgrade PostgreSQL to latest minor version.
> 
> On Wed, Apr 15, 2026 at 12:59 PM Holger Jakobs <holger@jakobs.com>
> wrote:
> 
>> Am 2026-04-15 09:05, schrieb Mahendra Singh:
>>> Dear Experts,
>>> 
>>> Need your expertise here..!
>>> 
>>> I want to patch my postgresql minor version to the latest minor
>>> version.
>>> How can I do so via offline mode? No need to enable the internet
>> on
>>> the postgresql server.
>>> Please advise and suggest a simple and easy solution.
>>> Like in Oracle or MSSQL servers, just download the update from the
>>> internet and install on the server.
>>> 
>>> Regards,
>>> Mahendra Singh
>>> DBA@DXB
>> 
>> Hi Mahendra,
>> 
>> This depends heavily on your platform and how you have installed
>> your
>> PostgreSQL initially.
>> 
>> Please tell us the details. Is it Windows, Linux, Mac? Did you
>> install
>> via your package manager? Did you use the PostgreSQL repos or those
>> provided by the distribution? Or did you use an installer by EDB?
>> 
>> Then we might be able to help.
>> 
>> Kind Regards,
>> Holger
>> 
>> --
>> --
>> Holger Jakobs, 51469 Bergisch Gladbach,

This information isn't sufficient. Which Linux Distro? Which kind of 
package (pgdg or from the distribution)?




-- 
--
Holger Jakobs, 51469 Bergisch Gladbach



Re: Update postgresql via offline mode

От
Ron Johnson
Дата:
On Wed, Apr 15, 2026 at 3:05 AM Mahendra Singh <msmahendrasingh18@gmail.com> wrote:
Dear Experts,

Need your expertise here..! 

I want to patch my postgresql minor version to the latest minor version.
How can I do so via offline mode? No need to enable the internet on the postgresql server. 
Please advise and suggest a simple and easy solution. 
Like in Oracle or MSSQL servers, just download the update from the internet and install on the server.

Assuming you use RHEL, manually download the relevant RPMs from these two directories (where X is the RHEL major version):

I automated it with a set of PowerShell scripts (since we have multiple PG major versions running on multiple RHEL versions).  It works like a champ.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

Re: Update postgresql via offline mode

От
Eduar Flow
Дата:
. 📥 Descargar paquetes (en otro equipo con internet)
Desde un equipo con conexión:
Ve al sitio oficial: PostgreSQL
Descarga la misma versión mayor (ej. 14.x) pero última menor disponible
Dependiendo de tu sistema:
Linux (ej. Ubuntu/Debian)
Descarga paquetes .deb:
Bash
apt download postgresql-14
apt download postgresql-client-14
RHEL/CentOS
Bash
yum install --downloadonly --downloaddir=/tmp/pg pkgname
Windows
Descarga el instalador .exe oficial
2. 📦 Transferir al servidor offline
Copia los paquetes usando:
USB
SCP desde red interna
Disco externo
3. 🛑 Detener PostgreSQL
Bash
sudo systemctl stop postgresql
4. ⬆️ Instalar actualización
Linux Debian/Ubuntu
Bash
sudo dpkg -i postgresql-14*.deb
RHEL/CentOS
Bash
sudo rpm -Uvh postgresql-14*.rpm
Windows
Ejecuta el .exe
Detectará instalación existente y actualizará
5. ▶️ Iniciar el servicio
Bash
sudo systemctl start postgresql
6. ✅ Verificar versión
Bash
psql -V
o dentro de PostgreSQL:
SQL
SELECT version();
⚠️ Buenas prácticas (muy importante)
Antes de actualizar:
💾 Backup completo:
Bash
pg_dumpall > backup.sql
📁 O copia del data directory (por seguridad extra)
🚨 Cosas a tener en cuenta
No mezclar repositorios o builds distintos
Asegúrate que las librerías requeridas también estén disponibles offline
Si usas extensiones, valida compatibilidad
🧠 Resumen simple
Sí, puedes hacerlo igual que Oracle/MSSQL:
Descargas el paquete en otro equipo
Lo copias
Paras PostgreSQL
Instalas encima
Inicias
Sin migraciones complicadas 👍

Yekma666

El mié, 15 de abr de 2026, 09:50, Gianfranco Cocco <Gianfranco.Cocco@vargroup.com> escribió:
Hi,
You can download from repository https://download.postgresql.org/pub/repos/yum/ the software that you need and transfer them to your server.
After that you can shutdown postgreSQL instance and launch the upgrade:

For example:

dnf install \
   postgresql1xxxPGDG.rhelxx.x86_64.rpm \
   postgresql1x-server-1x.x-1PGDG.rhelxx.x86_64.rpm \
   postgresql1x-libs-1x.x-1PGDG.rhelx.x.x86_64.rpm \
   .....rpm                    \
   .....rpm                    \
      --allowerasing

--allowerasing ==> replace only binaries related to the same family. 
 

Good work.
Regards,

Gianfranco
Gianfranco Cocco
​vargroup.com
Questo messaggio è stato spedito da Var Group S.p.A. o da una delle
​aziende del Gruppo. Esso, e gli eventuali allegati, potrebbero contenere
​informazioni di carattere estremamente riservato e confidenziale.
​Qualora non foste i destinatari designati, vogliate cortesemente
​informarci immediatamente con lo stesso mezzo ed eliminare il
​messaggio e i relativi eventuali allegati, senza trattenerne copia.
 

Da: Mahendra Singh <msmahendrasingh18@gmail.com>
Inviato: mercoledì 15 aprile 2026 09:05
A: pgsql-admin <pgsql-admin@lists.postgresql.org>
Oggetto: Update postgresql via offline mode
 
Dear Experts,

Need your expertise here..! 

I want to patch my postgresql minor version to the latest minor version.
How can I do so via offline mode? No need to enable the internet on the postgresql server. 
Please advise and suggest a simple and easy solution. 
Like in Oracle or MSSQL servers, just download the update from the internet and install on the server.

Regards,
Mahendra Singh
DBA@DXB
Вложения