pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: pg_upgrade Python version issue on openSUSE
Date: Sat, 26 Sep 2020 11:33:42 +0200
Message-ID: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com> (raw)

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 of them uses plpython, so I definitely need it. To better be safe than sorry, I want the issue resolved before migrations start, even for database clusters which don't need it.

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

Cheers,
Paul




view thread (28+ messages)  latest in thread

Message-ID: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com>
Permalink:  ../553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com/
Also on:    postgresql.org/message-id/553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paul.foerster@gmail.com
  Subject: Re: pg_upgrade Python version issue on openSUSE
  In-Reply-To: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com>
  References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox