Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kM6iz-00054f-4F for pgsql-general@arkaria.postgresql.org; Sat, 26 Sep 2020 09:42:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kM6ix-0002ah-Tb for pgsql-general@arkaria.postgresql.org; Sat, 26 Sep 2020 09:42:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kM6ix-0002YV-JP for pgsql-general@lists.postgresql.org; Sat, 26 Sep 2020 09:42:35 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kM6ir-00042Z-7g for pgsql-general@lists.postgresql.org; Sat, 26 Sep 2020 09:42:34 +0000 Received: by mail-ej1-x643.google.com with SMTP id u21so1913622eja.2 for ; Sat, 26 Sep 2020 02:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=NyQenwWUn57/qqSbwWK6mebw2EHUX3pjg8zDSrePPoI=; b=A7vdp2lowAm9brl77TtqfkVK6/JphW/ngqFIQ34EKXZk1Tsg0lLIvrU0keT8qrQxkE y2/08JsRmMnxIB7gtxUtToXmIStX472fHt7FY5ablYNvR0hTHMr853BBETwCqkYyDi7D Y2XZ0QWDqk4KA9n3nq72zzwzCylZsV6HawuP/Kqi1PNkrUQn9m6uRyABG4ejtIxY35Rw VI4qPyVXTgQ7VVAzRSPfwDnzRIl6DgFuMF9NsauVwgpAsAnA53P/NbXrQ5ztZStyMbhz 44gH21SticfioPTB0p1VbR441oi6vSN7QN5/itZV5PS+z3EmAYDebMBT0vArK1haPLHG zbrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=NyQenwWUn57/qqSbwWK6mebw2EHUX3pjg8zDSrePPoI=; b=pVsQ6XBTeoQR8i2wsTUKZ1u8C3joZ26Z/W4gimBOFfhrszV7g+dwH3nATomC7XzUtl u1N9eTQi3if4R2iZ38pf5HgqwUjpzOITb3cX4Bw4I8uAjz4ixBUbPYIwm7njmHJ1WYW7 sErsod2x4W6sB4X3Pg5/gBtMlruVs5m6dnVzaHgn6XmW3OUYtzNhMp10qATZn+mabDQ1 FGOgw4uMm1HKLCXR8g38VsYVlVVNc5+p6c3jPTB2c7UzVM7KFzxECCjzjNZHL/5qOtxJ WqZzBZCJjQd0K3cq2Ut8pCPibaTHGQwVAXSAN6actwMIERoT0geesIkUPu1nYVymbqQv 8how== X-Gm-Message-State: AOAM533Cs8d6j+HYBYrNf2NAX+BtOtyrEav2ONFb27uDKUbsrnzy1S9Q EDMVIiuzyyMZf/77efEFVWS47rD/Lm8= X-Google-Smtp-Source: ABdhPJygZtLvW/DEhFw/8XFPSCxatPbIeBDw86rVSxAO8QuERnNvXe8w06vnvLCDaIrvsjs2uBLWRg== X-Received: by 2002:a17:906:8246:: with SMTP id f6mr6453474ejx.296.1601113346968; Sat, 26 Sep 2020 02:42:26 -0700 (PDT) Received: from [192.168.1.8] (241-57-239-77.dyn.cable.fcom.ch. [77.239.57.241]) by smtp.gmail.com with ESMTPSA id q1sm3767851ejy.37.2020.09.26.02.42.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Sep 2020 02:42:26 -0700 (PDT) From: =?utf-8?Q?Paul_F=C3=B6rster?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: pg_upgrade Python version issue on openSUSE Date: Sat, 26 Sep 2020 11:42:25 +0200 References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com> To: PostgreSQL General In-Reply-To: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com> Message-Id: <1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, sorry, forgot to mention two things (see below) > On 26. Sep, 2020, at 11:33, Paul F=C3=B6rster = wrote: >=20 > Hi, >=20 > the OS here is openSUSE Leap 15.2. I downloaded the PostgreSQL 13.0 = source and built it without issues like so: >=20 > (pgTargetDir is /data/postgres/13.0) >=20 > $ ./configure \ > --prefix=3D${pgTargetDir} \ > --enable-nls \ > --with-icu \ > --with-perl \ > --with-python \ > --with-openssl \ > --with-ldap \ > --with-libxml \ > --with-tclconfig=3D/usr/lib64 > $ make install-world >=20 > As I said, no issues at all so far. Now, I set the new environment for = version 13.0 and do: >=20 > $ initdb -D "${PGDATANEW}" \ > -k \ > --encoding=3Dutf8 \ > --lc-collate=3Den_US.UTF-8 \ > --lc-ctype=3Den_US.UTF-8 \ > --wal-segsize=3D32 >=20 > Still, no issues and all is well. >=20 > Now comes the problem: I run pg_upgrade and it spits out problems with = plpython2: >=20 > $ 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 >=20 > 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 >=20 > Failure, exiting >=20 > $ cat loadable_libraries.txt=20 > could not load library "$libdir/plpython2": ERROR: could not access = file "$libdir/plpython2": No such file or directory > In database: postgres >=20 > openSUSE has no python2 anymore, only python3. The source database = does not even have plpython installed: >=20 > postgres=3D# select name, version from pg_available_extension_versions > postgres-# where installed; > name | version=20 > ---------+--------- > plperlu | 1.0 > dblink | 1.2 > plpgsql | 1.0 > plperl | 1.0 > (4 rows) >=20 > 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. 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.9 yet, 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