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

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.