BUG #6532: pg_upgrade fails on Python stored procedures

From: stuart(at)stuartbishop(dot)net
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6532: pg_upgrade fails on Python stored procedures
Date: 2012-03-15 13:13:29
Message-ID: E1S8AUj-0002Fe-V6@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

The following bug has been logged on the website:

Bug reference: 6532
Logged by: Stuart Bishop
Email address: stuart(at)stuartbishop(dot)net
PostgreSQL version: 9.1.3
Operating system: Ubuntu
Description:

The 9.1.3 changelog states pg_upgrade's handing of plpython stored
procedures was fixed, but that does not appear to be the case:

postgres(at)aargh:~$ /usr/lib/postgresql/9.1/bin/pg_upgrade --version
pg_upgrade (PostgreSQL) 9.1.3
postgres(at)aargh:~$ /usr/lib/postgresql/9.1/bin/pg_upgrade
--old-bindir=/usr/lib/postgresql/8.4/bin
--new-bindir=/usr/lib/postgresql/9.1/bin --old-datadir=8.4/main
--new-datadir=9.1/mig --old-port=5433 --new-port=5435
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions ok
Checking database user is a superuser ok
Checking for prepared transactions ok
Checking for reg* system oid user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for large objects ok
Creating catalog dump ok
Checking for prepared transactions ok
Checking for presence of required libraries ok

| If pg_upgrade fails after this point, you must
| re-initdb the new cluster before continuing.
| You will also need to remove the ".old" suffix
| from 8.4/main/global/pg_control.old.

Performing Upgrade
------------------
Adding ".old" suffix to old global/pg_control ok
Analyzing all rows in the new cluster ok
Freezing all rows on the new cluster ok
Deleting new commit clogs ok
Copying old commit clogs to new server ok
Setting next transaction id for new cluster ok
Resetting WAL archives ok
Setting frozenxid counters in new cluster ok
Creating databases in the new cluster ok
Adding support functions to new cluster ok
Restoring database schema to new cluster
psql:/var/lib/postgresql/pg_upgrade_dump_db.sql:3992: ERROR: could not
access file "$libdir/plpython": No such file or directory

There were problems executing "/usr/lib/postgresql/9.1/bin/psql" --set
ON_ERROR_STOP=on --no-psqlrc --port 5435 --username "postgres" -f
"/var/lib/postgresql/pg_upgrade_dump_db.sql" --dbname template1 >>
"/dev/null"
Failure, exiting

The relevant section of pg_upgrade_dump_db.sql is:

CREATE FUNCTION plpython_call_handler() RETURNS language_handler
LANGUAGE c
AS '$libdir/plpython', 'plpython_call_handler';

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2012-03-15 13:54:26 Re: BUG #6532: pg_upgrade fails on Python stored procedures
Previous Message Rikard Pavelic 2012-03-14 18:19:14 Re: BUG #6489: Alter table with composite type/table

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-03-15 13:54:26 Re: BUG #6532: pg_upgrade fails on Python stored procedures
Previous Message Thom Brown 2012-03-15 12:03:03 Re: Command Triggers, patch v11