Forum OpenACS Q&A: Postgres 7.2: tweaking sec_rotate_last_visit function

Hi!

I just spent long time with openacs 3.2.5 and PostgreSQL 7.2.

I was getting some error with values to large to fit into
character(1) fields. Looking at psql 7.2 docs, I've found that
7.2 now does not silently truncate too large strings into smaller
char fields any more, but issues an error. After long time, I
nailed down the SQL function  sec_rotate_last_visit(integer,
integer), which was issuing the error. I threw out the code (some
updates, inserts, etc.) and just made the function return 1 in
any case, as I didn't want to follow complete thread of logic or
understand what is the purpose of that function.

Now the whole thing seems to be working on PostgreSQL 7.2.

The question is:
What other things can I expect with PostgreSQL 7.2?
Has anyone had such setup running successfully? As I said, it
seems it is not crashing any more, but I don't even know what
functionality have I thrown out with tweaking that SQL function.
If someone knows what other things I might have ruined, please
let me know! Note that this is first time I'm looking at OpenACS,
and aolserver, but I do have tons of experience with Tcl and
Postgres.

Thanks,
  Timotej

Collapse
2: OACS 3.2.5 on Postgres 7.2 (response to 1)
Posted by Jonathan Ellis on
I asked this question a couple days ago and got no response. Here's what I see from searching the bboard:
char/varchar problems:
bboard: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0004g2
bboard: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0004uD
sec_: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=00041d
(also: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0003tm)
(this is the problem you ran into, and suggests a better solution)
null abuse:
https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0004Sy

general, including non-db fixes to 3.2.5:
https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0003ze

So we have at least 6 people running 3.2.5 on PG 7.2, who have reported around half a dozen "core" errors. You'll probably see more in parts of the toolkit these people haven't explored, but it doesn't look unmanagable by any means.

If anyone wants to volunteer to help shepard through a 3.2.6 release that incorporates the changes needed to run under PG 7.2 feel free to contact Roberto Mello (who babysits care of OpenACS 3.2.x releases).

You can find his e-mail address by visiting https://openacs.org/directory (yes I'm feeling lazy!)

PostgreSQL 7.2 is *NOT* supported by OpenACS 3.2.5, if you hadn't noticed. We never claimed compatibility with future versions of PostgreSQL.

However, I think there is enough demand to warrant a 3.2.6 release. This will probably be the last release in the 3.2 series.

We have many things to fix, especially the bboard html issues and we have to convert many "timestamp" datatype declaration to "timestamp(0)" because PG 7.2 has millisecond precision on timestamps and some functions take the result of "now()" and run through Tcl's clock scan.

I'll take a look at the patches we have with more importance in the SDM and start working from there. Those with OpenACS 3.2 CVS commit privileges, your help would be appreciated.

Let me know what other glaring issues need to be fixed.