pg_upgrade Python version issue on openSUSE - Mailing list pgsql-general

From Paul Förster
Subject pg_upgrade Python version issue on openSUSE
Date
Msg-id 553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com
Whole thread Raw
Responses Re: pg_upgrade Python version issue on openSUSE
Re: pg_upgrade Python version issue on openSUSE
List pgsql-general
Hi,

the OS here is openSUSE Leap 15.2. I downloaded the PostgreSQL 13.0 source and built it without issues like so:

(pgTargetDir is /data/postgres/13.0)

$ ./configure \
    --prefix=${pgTargetDir} \
    --enable-nls \
    --with-icu \
    --with-perl \
    --with-python \
    --with-openssl \
    --with-ldap \
    --with-libxml \
    --with-tclconfig=/usr/lib64
$ make install-world

As I said, no issues at all so far. Now, I set the new environment for version 13.0 and do:

$ initdb -D "${PGDATANEW}" \
    -k \
    --encoding=utf8 \
    --lc-collate=en_US.UTF-8 \
    --lc-ctype=en_US.UTF-8 \
    --wal-segsize=32

Still, no issues and all is well.

Now comes the problem: I run pg_upgrade and it spits out problems with plpython2:

$ pg_upgrade --check -k
Performing Consistency Checks on Old Live Server
------------------------------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for presence of required libraries                 fatal

Your installation references loadable libraries that are missing from the
new installation.  You can add these libraries to the new installation,
or remove the functions using them from the old installation.  A list of
problem libraries is in the file:
    loadable_libraries.txt

Failure, exiting

$ cat loadable_libraries.txt
could not load library "$libdir/plpython2": ERROR:  could not access file "$libdir/plpython2": No such file or
directory
In database: postgres

openSUSE has no python2 anymore, only python3. The source database does not even have plpython installed:

postgres=# select name, version from pg_available_extension_versions
postgres-# where installed;
  name   | version
---------+---------
 plperlu | 1.0
 dblink  | 1.2
 plpgsql | 1.0
 plperl  | 1.0
(4 rows)

Can you please tell me what I am doing wrong here? Yes, I could compile the source without Python in this particular
case,because it is not needed on this particular database cluster. But we have many more database clusters and a bunch
ofthem uses plpython, so I definitely need it. To better be safe than sorry, I want the issue resolved before
migrationsstart, even for database clusters which don't need it. 

Any help would be appreciated. Thanks very much in advance.

Cheers,
Paul


pgsql-general by date:

Previous
From: Jack Douglas
Date:
Subject: Yum repository RPM behind release
Next
From: Paul Förster
Date:
Subject: Re: pg_upgrade Python version issue on openSUSE