Forum OpenACS Q&A: Workaround for pg_dump ordering bug

Collapse
Posted by Don Baccus on
As most of you know by now, there's a bug in the dumps created by
pg_dump that causes a re-install of OpenACS from such a dump to fail.

The problem is simple, and has hopefully been fixed by some work
already done for the upcoming PG 7.1 release: some functions
("sysdate()" in our case) can be referred to by the dump output before
they're defined.

As it turns out, I've been doing some playing around and the
workaround is every bit as simple:

Before reloading a pg_dump of your OpenACS installation, do a "psql -f
www/doc/sql/postgres.sql".  This will define "sysdate()" for you (you
must also create the language plpgsql beforehand).  You can then
reload the dump, ignoring the "already defined" error messages that
will result.

Yes, this workaround's ugly but it works and is something that we only
need to live with for a short while.

Collapse
Posted by Roberto Mello on
I actually have tried this a couple months ago. It was better than without it (PostgreSQL wouldn't die continuously) but it would still display some quirks and some things would fail. I can't remember what but I'll look. That was with OpenACS 3.2.2.
Collapse
Posted by Don Baccus on
Please look, then.  If you give me specifics I'll look more deeply, the site I was helping out with actually makes minimal use of OpenACS so I didn't dig very deeply.