Forum OpenACS Development: Re: 5.0 upgrade process requires Tcl Calls

Collapse
Posted by Dave Bauer on
You need to fix any upgrade scripts that you run to make sure any plpgsql function definitions say "timestamptz" instead of timestamp.

This is only if you are upgrading from a version that did not support postgresql 7.3 to a versison that does support 7.3. Basically any pre-4.6.3 version to any version 4.6.3 or later.

Collapse
Posted by Joel Aufrecht on
I realized that my original plan was doomed, because you can't run OpenACS 4.6.1 on PostgreSQL 7.3.  In other words, if you want to upgrade from OpenACS 4.6.1/Pg 7.2, you have to upgrade OpenACS to pg 4.6.3, and then upgrade the postgres database to 7.3, and then switch to using postgres 7.3 to run the upgraded database, all in that order.  You cannot upgrade from 4.6.1/pg 7.2 to 4.6.3/7.3 via 4.6.1/pg 7.3, because that combination is not valid.

So:
1) Inspect the live system by going to /acs-admin/apm, and discover that the kernel is 4.6.1.
2) Make a copy of the live database (postgresql), which is PostGreSQL 7.2
3) On a development machine, restore the dmp file of the production db
4) Download the OpenACS 4.6.3 tarball and unpack it
5) Start aolserver using the 4.6.3 tarball as the homedir and the restored database as the db (still 7.2!)
6) Go to the APM and click Install
7) Select only the kernel for Upgrade.  Select both
      sql/postgresql/upgrade/upgrade-4.6.1-4.6.2.sql
    sql/postgresql/upgrade/upgrade-4.6.2-4.6.3.sql
8)      Failed to install ACS Kernel, version 4.6.3. The following error was generated:

Installed ACS Kernel, version 4.6.3.

# Installing data model for ACS Kernel 4.6.3...

    * Loading data model /var/lib/aolserver/openacs-4.6.3/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6.1-4.6.2.sql...

CREATE
COMMENT
COMMENT
COMMENT
ALTER
UPDATE 47
COMMENT
DROP
DROP
CREATE
CREATE
CREATE
CREATE
CREATE
CREATE
DROP
DROP
CREATE
CREATE
DROP
DROP
CREATE
CREATE
DROP
DROP
CREATE
CREATE
HTTP/1.0 200 OK
Server: AOLserver/3.3.1+ad13
Content-Type: text/html; charset=iso-8859-1
MIME-Version: 1.0
Date: Sat, 13 Dec 2003 19:46:41 GMT
Content-Length: 3211
Connection: close






          Request Error

psql:upgrade-4.6.1-4.6.2.sql:237: ERROR:  view "acs_privilege_descendant_map_view" does not exist
psql:upgrade-4.6.1-4.6.2.sql:244: ERROR:  Attempt to insert rule "_RETacs_privilege_descendant_ma" failed: already exists