Thread:Project:Support desk/update failure: 58P01: ERROR: could not load library "/usr/local/lib/postgresql/plpgsql.so

Version info: MediaWiki 	1.21.11 PHP 	5.5.14 (apache2handler) PostgreSQL 	9.3.4

Attempting to run: php update.php yields Refreshing ts2_page_title ...A database query syntax error has occurred. The last attempted database query was: "CREATE OR REPLACE FUNCTION ts2_page_title RETURNS TRIGGER LANGUAGE plpgsql AS $mw$ BEGIN IF TG_OP = 'INSERT' THEN NEW.titlevector = to_tsvector(REPLACE(NEW.page_title,'/',' ')); ELSIF NEW.page_title != OLD.page_title THEN NEW.titlevector := to_tsvector(REPLACE(NEW.page_title,'/',' ')); END IF; RETURN NEW; END; $mw$ " from within function "DatabaseBase::sourceFile( /usr/local/www/mediawiki/maintenance/postgres/archives/patch-ts2pagetitle.sql )". Database returned error "58P01: ERROR: could not load library "/usr/local/lib/postgresql/plpgsql.so": dlopen (/usr/local/lib/postgresql/plpgsql.so) failed: /usr/local/lib/postgresql/plpgsql.so: Undefined symbol "HeapTupleHeaderGetDatum" "

Any hints? I've also tried the web upgrade interface. I get to There are MediaWiki tables in this database. To upgrade them to MediaWiki 1.21.11, click Continue. and can click continue, but the page reloads at the same spot. The previous incremental steps work fine (from start of update to updating the tables) but I can never get to the "Database settings" page.

I've done a full rebuild and reinstall with portmaster -Rafd and get the same results.