Forum OpenACS Q&A: Re: pg_restore with blobs problem

Collapse
Posted by Don Baccus on
Ouch, this is why I've always done text dumps and have reloaded via psql.  At the very worst you can ignore dupe errors of this sort in psql or hand-edit the text dump.  We don't use PG's built-in binary large objects but rather store binary data after first uuencoding it, which makes it possible to use text dumps.

This problem isn't really OpenACS related - postgres flat-out is unable to guarantee it will make a dump that will load without tweaking of this sort.  It will dump functions that call other functions before they're restored.  An obvious workaround is to patch pg_restore so it doesn't die on a dupe function restore.

I suggest you take this to the PG mailing lists to see if Tom or anyone else has any bright ideas.

Collapse
Posted by Claudio Pasolini on
I never investigated the way used by OpenACS to store blobs, and I don't really understand how uuencoding binary data makes it possible to use plain text dumps, but simply removing all the switches from pg_dump and restoring with psql has worked!

Thank You Don!