Forum OpenACS Q&A: Restoring and Renaming Postgres User

I just tried renaming my postgres user and stumbled across some error messages during the import to psql, I did:

pg_dump old_db_name | gzip > old_db_name.dump.gz
createdb new_db_name
createlang plpgsql new_db_name
gunzip -c old_db_name.dump.gz | psql new_db_name

Here are the errors:

ERROR:  Function 'tree_ancestor_keys(varbit, int4)' does not exist
        Unable to identify a function that satisfies the given argument types
        You may need to add explicit typecasts

ERROR:  parser: parse error at or near "SELECT"
ERROR:  parser: parse error at or near "SELECT"

ERROR:  Relation "party_approved_member_map" does not exist

After the import I manually created the function tree_ancestor_keys as well as the view party_approved_member_map (don't know what the view is for) and my site seems to function ok again.

I just wanted to share this experience and hear if anybody knows why these small glitches in the export/import occur. My OpenACS code base is from last summer.

Collapse
Posted by Ola Hansson on
Hi Peter,

As a matter of fact we discussed the same topic yesterday over here:

https://openacs.org/forums/message-view?message_id=70759

Cheers,

Collapse
Posted by Peter Marklund on
sorry, I just noticed that the glitches mentioned above have been discussed at length in a different thread an Jun seems to have a solution similar to mine.
Collapse
Posted by Jun Yamog on
Hi Peter,

What PG ver are you using?  Based from my later observation (not testing), it seems I don't encounter the problem with the  views anymore on PG 7.2.x