Forum OpenACS Q&A: Upgrading ACS/pg Alpha to beta1

Collapse
Posted by Roberto Mello on
Hi folks,

    For me to upgrade from ACS/pg alpha (2.4) to beta1, do I just pg_dump
my whole db , load the new datamodel, configure the new ad.ini, and
reload everything into PG ? Is there anything else I am missing ?

    Thanks,

    Roberto
Collapse
Posted by Don Baccus on
We didn't do what aD does for upgrades, i.e. provide update .sql scripts so that you can update the data model in place.  Thus preventing the need to dump and reload.

We'll need to start doing such things in the future, though this is one of those areas where PG is weak as you can't add constraints to a table, only new columns.  It is known how to do this (we added alter table add foreign key, and the guy who did it knows how to do it for alter table add constraint now) but it isn't done, yet.

Keep in mind that Oracle only recently added "drop column" and referential actions like "on cascade set null" (which we now have in PG), this stuff's pretty complicated and even the big boys have work to do.

OK, I'll stop beating around the bush - try the pg_dump option that dumps proper "insert" statements, and reload that.  It should list the columns that are being inserted.  It will go a lot faster if you do the inserts inside a transaction.

We'll try to make this process less painful in the future.  Remember, the 2.4 port wasn't really ever completed :)