| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | "Subramanian,Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pg_upgrade Error- Kindly help |
| Date: | 2026-07-21 10:08:23 |
| Message-ID: | 2978229d8e9956f3fdecc31277536ad64b766dcc.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
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 | Subramanian,Ramachandran | 2026-07-21 10:51:09 | AW: pg_upgrade Error- Kindly help |
| Previous Message | Subramanian,Ramachandran | 2026-07-21 08:58:25 | pg_upgrade Error- Kindly help |