| From: | "Subramanian,Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de> |
|---|---|
| To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org> |
| Subject: | AW: pg_upgrade Error- Kindly help |
| Date: | 2026-07-21 10:51:09 |
| Message-ID: | f8299bb3a7aa426ab1fbe9366d42c8ee@alte-leipziger.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Hallo Sir,
Thank you so much for your reply. Our Linux Sysadmin says the upgrade package that he is executing does not create a new directory for V18. Rather it just replaces the existing files in our /bin library. Naturally /bin has executables that belong to various other products.(not just exclusively postgres)
1. In such a situation is an inplace upgrade never possible? What if I copied the entire /bin directory to a /bin/V16 directory before our sysadmin does his thing and used this /bin/V16 in the pg_upgrade command
2. Forgive my ignorance, what does it mean when you say " it needs all the executables from V16 including the shared libraries" ? Does a V18 postgres need updated executables that do not belong specifically to postgres ? Like executables that operate at the OS level that are usually not seen by a DBA when we execute postgres commands?
3. Our sysadmin suggested we try " # postgresql-new-systemd-unit --unit postgresql(at)secondary --datadir /path/to/data/directory" "# postgresql-setup --upgrade --unit postgresql(at)secondary". I have no idea what it means. However I tried to use it and the process told me that there was a checksum problem between the V16 and V18. I tried to turn on the checksum for V16 with the pg_checksums command...and it failed again due to Library mismatch. Is it possible to do a inplace upgrade with this #postgresql -unit method even without old and new bin libraries?
Now I have done the upgrade with pg_dumpall method. It works, but I really want to do an inplace upgrade.
I am very grateful for your constant help.
LG
Ram
Freundliche Grüße
i. A. Ramachandran Subramanian
Zentralbereich Informationstechnologie
Alte Leipziger Lebensversicherung a.G.
Hallesche Krankenversicherung a.G.
Alte Leipziger Lebensversicherung a.G., Alte Leipziger-Platz 1, 61440 Oberursel
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Robert Gladis, Dr. Jochen Kriegmeier, Alexander Mayer, Christian Pape, Udo Wilcsek
Sitz Oberursel (Taunus) · Rechtsform VVaG · Amtsgericht Bad Homburg v. d. H. HRB 1583 · USt.-IdNr. DE 114106814
Hallesche Krankenversicherung a.G., Löffelstraße 34-38, 70597 Stuttgart
Vors. des Aufsichtsrats: Dr. Walter Botermann · Vorstand: Christoph Bohn (Vors.), Dr. Jürgen Bierbaum (stv. Vors.), Robert Gladis, Dr. Jochen Kriegmeier, Alexander Mayer,
Christian Pape, Udo Wilcsek
Sitz Stuttgart · Rechtsform VVaG · Amtsgericht Stuttgart HRB 2686 · USt.-IdNr. DE 147802285
Beiträge zu privaten Kranken- und Pflegekrankenversicherungen unterliegen nicht der Versicherungsteuer (§ 4 Nr. 5 VersStG) · Versicherungsleistungen sowie Umsätze aus Versicherungsvertreter-/Maklertätigkeiten sind umsatzsteuerfrei
Die Pflichtangaben der ALH Gruppe gemäß § 35a GmbHG bzw. § 80 AktG finden Sie hier: https://www.alte-leipziger.de/impressum
______________________
ALH Gruppe
Alte Leipziger-Platz 1, 61440 Oberursel
Tel.: +49 (6171) 66-4882
Fax: +49 (6171) 66-800-4882
E-Mail: ramachandran(dot)subramanian(at)alte-leipziger(dot)de
www.alte-leipziger.de
www.hallesche.de
-----Ursprüngliche Nachricht-----
Von: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Gesendet: Dienstag, 21. Juli 2026 12:08
An: Subramanian,Ramachandran IT-md-db <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>; pgsql-novice(at)lists(dot)postgresql(dot)org
Betreff: Re: pg_upgrade Error- Kindly help
On Tue, 2026-07-21 at 08:58 +0000, Subramanian,Ramachandran wrote:
> I am trying to do a pg_upgrade from V16 to V18.
>
> We are running RHEL 9.8.
>
> All our postgresql binary files are in /bin directory. There is no separate /bin/postgre/v16/bin directory.
>
> Our Sysadmin did his magic and now we have the new bin files in the same /bin directory.
> ( In effect we do not have a old-binary and new-binary directory ).
Big mistake. That won't work.
> 1. I created a new local directory called /binary_files/V16 and copied the bin files from
> a non upgraded server to this server, just to have a copy of the old binaries.
> 2. Moved my instance data directory from data to data_old 3. Did an
> initdb with the new V18 pg_ctl to create a new empty Instance.
>
> When I do a dry run of pg_upgrade I get the below error .
>
> 1. What should I do to overcome this error?
> 2. Why is it looking for port number 50432 ? We never used this port before.
>
> -----------------------------------------------------------------
> pg_upgrade run on Tue Jul 21 10:41:10 2026
> -----------------------------------------------------------------
>
> FATAL: incompatible library "/usr/lib64/pgsql/pg_stat_statements.so":
> version mismatch
> 2026-07-21 10:41:10.902 CEST [44817] DETAIL: Server is version 16, library is version 18.
Ad 1: You need *all* executables from v16, including the shared libraries in /lib.
You get the error since the "postgres" executable from v16 finds a library
from v18.
Ad 2: pg_upgrade starts the clusters on a different port when it needs them to dump
or restore the metadata information.
If you want to use pg_upgrade, you will have to be able to install both versions of PostgreSQL on the same machine. You will have to revise your choice of software installation directory. Use something that contains the major version number.
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2026-07-21 12:16:01 | Re: AW: pg_upgrade Error- Kindly help |
| Previous Message | Laurenz Albe | 2026-07-21 10:08:23 | Re: pg_upgrade Error- Kindly help |