Dear Frank,
acs_objects.tree_sortkey errors ring a loud bell, as this column has been removed in the passage to 5.9.0
http://www.openacs.org/xowiki/openacs-todo
This was needed to build a hierarchy for objects in days before Postgres 8.4 and recursive queries.
This is another pointer of version mismatch during the upgrade.
All the best