Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
699 stars 145 forks source link

Can't seem to uninstall cleanly #218

Closed asr1901 closed 5 years ago

asr1901 commented 5 years ago

I am using pg_upgrade to upgrade an old PG10 cluster to PG11. The old PG10 did have multicorn installed, but we no longer use it on this machine. In order to uninstall I did:

[root@pg11a ~]# git clone git://github.com/Kozea/Multicorn.git
Cloning into 'Multicorn'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 15442 (delta 3), reused 8 (delta 2), pack-reused 15429
Receiving objects: 100% (15442/15442), 5.84 MiB | 9.51 MiB/s, done.
Resolving deltas: 100% (7424/7424), done.

[root@pg11a ~]# cd Multicorn

[root@pg11a Multicorn]# export PGBINDIR=/usr/pgsql-10/bin/;export PATH=$PGBINDIR:$PATH:$HOME/bin

[root@pg11a Multicorn]# make uninstall
Python version is 2.7
rm -f '/usr/pgsql-10/lib/multicorn.so'
rm -f '/usr/pgsql-10/share/extension'/multicorn.control
rm -f '/usr/pgsql-10/share/extension'/multicorn--1.3.4.sql
rm -f '/usr/pgsql-10/doc/extension'/.//doc/multicorn.md
[root@pg11a Multicorn]#

I also verified that Multicorn was uninstalled by running "SELECT extname, oid, extnamespace FROM pg_extension;" and saw that it's not listed there.

However, when using pg_upgrade I see:

postgres@pg11a:~ $ pg_upgrade --old-datadir /pgsql/10/data/ --new-datadir /pgsql/11/data --old-bindir /usr/pgsql-10/bin --new-bindir /usr/pgsql-11/bin/ --link --check
Performing Consistency Checks
-----------------------------
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
postgres@pg11a:~ $ cat loadable_libraries.txt 
could not load library "$libdir/multicorn": ERROR:  could not access file "$libdir/multicorn": No such file or directory

Is there another place that multicorn is referenced in the old cluster that is not handled by "make uninstall"?

asr1901 commented 5 years ago

FYI, I also set my path to PG11 binaries and ran the same "make uninstall" command, but that did not change anything and I am still unable to run pg_upgrade because multicorn doesn't exist in the new server.

asr1901 commented 5 years ago

FYI, you can close this. Even though we uninstalled multicorn, there was a database in the cluster that still had it "installed". DROP EXTENSION on that DB fixed the issue.