Forum OpenACS Q&A: OpenACS from v7.1.x -> v7.2.x broken ... ?

Due to a recent hardware failure, we've had to move all our clients to a new server ... under the old server, everyone was running under v7.1.3, but the new server has v7.2.4 on it, so we did a dump/reload of their data, but now they are experiencing problems that a Google search just isn't finding the answer to ... namely, on start up, the following error is being logged to the aolserver log file:

[15/Mar/2003:20:35:15][53566.135335936][-main-] Notice: Querying '
            select * from (
            select token_id, token
            from secret_tokens
            sample(15)
            ) where rownum < '100';'
[15/Mar/2003:20:35:15][53566.135335936][-main-] Error: Ns_PgExec: result status: 7 message: ERROR:  parser: parse error at or near "15"

for the life of me, I can't find where sample() is defined anywhere, either as a CREATE FUNCTION, or in the PostgreSQL 7.1 docs ... this is causing the security stuff to fail to initialize, so that the site is essentially down right now ...

The OpenACS installation is an OpenACS 4.x from April(ish) of last year ...

Help?

Thanks ...

Collapse
Posted by Jeff Davis on
that is an oracle query (sample is the quickest way to get a random sample of a table), in this case it picks 15% of the rows in the table and returns the first 100.

Not sure why it would decide to use oracle queries after a dump/restore though.

Collapse
Posted by Don Baccus on
The old Oracle query is still inline in the Tcl script - I just checked, and while the oracle and postgres versions of the query do exist in the proper query files, the original inline query's not been cleaned out from the script.

My guess is that the query files aren't being loaded for some reason. That would cause the query dispatcher to use the inline query by default, which happens to be an Oracle query. Or that somehow acs-tcl/tcl/security-procs-postgresql.xql is missing for some reason (might as well check that first, it's easy)

Also ... depending on just when this site was created, it may not work out of the box on PG 7.2. Every major PG release - 6.5->7.0->7.1->7.2->7.3 - has brought incompatibilities that has forced us to rewrite some code. We generally try to support one full major release back (in other words 4.6.2 will support PG 7.2 and PG 7.3) but obviously we've not been able to predict exactly what new incompatibilities the PG group will introduce beforehand so can't guarantee forward compatibility.

So one question is whether or not the version of OpenACS these guys started with was one fixed to work with PG 7.2 or not ...

But regardless it should at least start up ...