From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Paul Förster <paul.foerster@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: pg_upgrade Python version issue on openSUSE
Date: Sun, 27 Sep 2020 10:30:31 -0700
Message-ID: <a16372ea-15cf-6e0d-dbf3-46b56c234735@aklaver.com> (raw)
In-Reply-To: <2EFE8070-928B-4444-9D05-FD56F30D7F79@gmail.com>
References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com>
<1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com>
<06317862-1908-48C7-8766-F6D1B4BFEB9F@gmail.com>
<1990004.1601129252@sss.pgh.pa.us>
<9D64B513-77D4-41D9-87E5-0727FAF96C84@gmail.com>
<c1ed9580-1d13-8f9a-ece7-caa672a7b23f@aklaver.com>
<2EFE8070-928B-4444-9D05-FD56F30D7F79@gmail.com>
On 9/27/20 2:00 AM, Paul Förster wrote:
> Hi Adrian,
>
>> On 27. Sep, 2020, at 00:09, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>> Could it be that at some point in these instances history plpython* where installed as CREATE LANGUAGE and you are dealing with the vestiges of that?
>
> I do know for sure that that never happened because the database clusters with this effect are my personal test databases and I never used Python. I did some tests with plperl and plperlu, though, but never python, because I don't "speak" python.
>
> What is possible is, those databases are clones of a Patroni cluster database (primary) I used to experiment with. I just copied them to new PGDATAs back then and changed PGPORT of course. I know, I could have done initdb and pg_dumpall but just copying the whole database cluster was the fast way to go, even more so as the PostgreSQL software was exactly the same. Just PGDATA and PGPORT changed for the clone. From what I know this is a perfectly legal way to do it as long as the source database cluster is properly shut down during the copy process.
>
> Maybe Patroni did it then implicitly? I'm not sure how Patroni works internally but I know that it is written in Python. Maybe it does install something in the database which I don't know and can't find? I tried searching for anything owned by "replicator" but can't find anything.
>
>> Are you able to go back and reconstruct them and then do \dL (languages) and \dx (extensions)?
>
> The machine in question is my personal test box at home. I don't do regular backups there. If I break something I just reinstall it. So going back into the past with backups is not possible for me. The only thing that I kept running a long time now is the Patroni cluster because I have some data stored in it. But this is the only "history" there is. However, \dx and \dL do not show any Python extension or language on the Patroni cluster too, which is still 12.4.
Does:
SELECT
lanname, proname, probin
FROM
pg_proc
JOIN
pg_language
ON
pg_language.oid = pg_proc.prolang
WHERE
pg_language.lanname='plpythonu'
AND
probin IS NOT NULL;
show anything? This would need to be repeated for each cluster in database.
>
> Still, thanks for helping.
>
> Cheers,
> Paul
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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: adrian.klaver@aklaver.com, paul.foerster@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: pg_upgrade Python version issue on openSUSE
In-Reply-To: <a16372ea-15cf-6e0d-dbf3-46b56c234735@aklaver.com>
References: <553A044A-D0E3-475D-8DC0-5845381CB086@gmail.com> <1FB046FC-BE42-4D66-B0AE-E94B6CB9498E@gmail.com> <06317862-1908-48C7-8766-F6D1B4BFEB9F@gmail.com> <1990004.1601129252@sss.pgh.pa.us> <9D64B513-77D4-41D9-87E5-0727FAF96C84@gmail.com> <c1ed9580-1d13-8f9a-ece7-caa672a7b23f@aklaver.com> <2EFE8070-928B-4444-9D05-FD56F30D7F79@gmail.com> <a16372ea-15cf-6e0d-dbf3-46b56c234735@aklaver.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