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

From Paul Förster
Subject Re: pg_upgrade Python version issue on openSUSE
Date
Msg-id 1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com
Whole thread Raw
In response to pg_upgrade Python version issue on openSUSE  (Paul Förster <paul.foerster@gmail.com>)
Responses Re: pg_upgrade Python version issue on openSUSE
List pgsql-general
Hi,

sorry, forgot to mention two things (see below)

> On 26. Sep, 2020, at 11:33, Paul Förster <paul.foerster@gmail.com> wrote:
>
> 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. 

the two things I forgot to mention are:

a) the versions I will be upgrading from are 11.9 and 12.4. The above thing happens with 12.4. Since I didn't check
11.9yet, I cannot say if it appears there too. 

b) the 12.4 software also does not have plpython2 files in its lib64 directory. Both only have plpython3.so:

$ ll /data/postgres/*/lib64/plpython*
-rwxr-xr-x 1 postgres dba 151672 Aug 13 16:28 /data/postgres/12.4/lib64/plpython3.so
-rwxr-xr-x 1 postgres dba 151544 Sep 26 10:38 /data/postgres/13.0/lib64/plpython3.so

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

Cheers,
Paul




pgsql-general by date:

Previous
From: Paul Förster
Date:
Subject: pg_upgrade Python version issue on openSUSE
Next
From: Julien Rouhaud
Date:
Subject: Re: PG 13 trusted extensions and pg_available_extensions