Forum OpenACS Development: Re: OpenACS 5.8(head) on Postgres 9.2

Collapse
Posted by Gustaf Neumann on
We have done no testing with pg9.2 (which might work or not). As i wrote, the changes for pg9.1 are in oacs-head, not in oacs-5.7.

With the head version, postgres' default pg config file works (i use e.g. on mac os x the mac ports version). In case you are migrating an old postgres config file, your have to remove add_missing_from and regex_flavor, since these flags are gone since 9.0 (http://www.postgresql.org/docs/9.0/static/release-9-0.html).

You will have to use a recent version of nspostgres:
http://aolserver.cvs.sourceforge.net/viewvc/aolserver/nspostgres/

Collapse
Posted by Jim Lynch on
Gustaf,

So that takes care of two of the three postgresql.conf settings... what about the third, which involves whether to use oids? The pg folks have deprecated oids, presumably pg devs want to see them gone soon so it probably makes sense to at least see about removing dependence on them.

How big of a job is that? Other comments?

Collapse
Posted by Gustaf Neumann on
How big of a job is that? Other comments?

For most purposes in OpenACS oids are not needed. A quick grep returned the following places:

acs-content-repository/sql/postgresql/content-type.sql
acs-kernel/sql/postgresql/acs-metadata-create.sql
acs-kernel/sql/postgresql/postgresql.sql
acs-tcl/tcl/test/datamodel-test-procs.tcl
acs-subsite/www/admin/users/new-postgresql.xql 
acs-subsite/www/pvt/alerts-postgresql.xql

The config flag default_with_oids is just used for creation of new tables. So if one migrates an existing database to e.g. PG 9*, the oids are as well migrated, and one does not need the flag in the config file.

I am not sure that pg wants to get rid of OIDs, since these are used as PKs for various system tables (see datatype-oid).

For new installations, if the goal is to remove the config dependency, the simplest fix is probably to add WITH OIDS to the few tables, that still require OIDs.

Collapse
Posted by Keith Paskett on
I have switched all of our development servers to Postgres 9.2, using OpenACS head. There are a number for 9.2 features we really want to start using, like range types, as well as significant performance improvements. We haven't had any issues with OpenACS core packages on PG 9.2. The only other packages we have used are acs-developer-support, acs-events, and acs-datetime
Collapse
Posted by Gustaf Neumann on
Keith, good to hear that!