I'm trying to perform PostgreSQL 9.6 -> 10 upgrade with link
method:
/usr/lib/postgresql/10/bin/pg_upgrade --link \
--old-datadir=/var/lib/postgresql/9.6/main \
--new-datadir=/var/lib/postgresql/10/main \
--old-bindir=/usr/lib/postgresql/9.6/bin \
--new-bindir=/usr/lib/postgresql/10/bin \
--old-options=' -c config_file=/etc/postgresql/9.6/main/postgresql.conf' \
--new-options=' -c config_file=/etc/postgresql/10/main/postgresql.conf' \
--old-port=5432 \
--new-port=5433
however the upgrade process always fails on "untrusted languages":
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 535968; 0 0 ACL LANGUAGE "plpythonu" postgres
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpythonu" is not trusted
DETAIL: GRANT and REVOKE are not allowed on untrusted languages, because only superusers can use untrusted languages.
Command was: GRANT ALL ON LANGUAGE "plpythonu" TO "mydb";
Any idea how to fix this? I've already tried dropping plpythonu
extension before upgrade.
pg_language
. But the newer version sys tables might not have this.plpythonu
functions in all namespaces.