Forum OpenACS Q&A: PostgreSQL 7.1 released

Collapse
Posted by David Touitou on
Yesterday actually...

Here is more information from another thread that may help in making your decision. -Bob

Response to pg_dump 7.1RC2 (7.1 released!!!)

I have been to the pgsql-hackers list. The pg_dump problem is very reproducible and should be fixed ASAP, is their opinion. The 'sad' news is: It will not make it into 7.1, as that has been released this night (mine anyway). People running RC4: don't bother upgrading, they only changed one string in the python arena (removed 'BETA' from something.

The pg_dump problem, if I understand correctly, exists because the view is dumped when the related table (based on OID) is dumped. So the view OID is not used, but the table/relation OID instead. They will fix this in 7.1.1 which 'The Hermit Hacker' scheduled for may 1st. I would suggest not upgrading to 7.1 for production 3.2.x systems, unless you REALLY need the features, as you will run into restore problems... waiting 15 more days should not be a problem, me thinks.

On the bright side: 7.1 is much, much faster in my limited experience to date. The restore took only a fraction of the time it took on 7.0... jummy!

-- Pascal Scheffers, April 14, 2001

Collapse
Posted by Connie Hentosh on
If you look at CVS now it seems that there might be a patch for the dump problem. I haven't tested it yet.
Collapse
Posted by Don Baccus on
Pascal ... if you have the time, it would be great if you could grab this patch (which I confirmed exists, thanks for the heads-up, Connie!) and try your dump-restore.
Collapse
Posted by Pascal Scheffers on
Unfortunately (for us) there were other patches applied to the Postgres CVS version of pg_dump after the code-freeze for 7.1. The patches seem to have dependencies elsewhere in the source tree. If I just swap the pg_dump from 7.1 with the CVS version, it crashes halfway down complaining about an OID not allowed to be NULL:
getTables(): SELECT (for VIEW ec_subsubcategories_augmented) returned
NULL oid
SELECT was: SELECT definition as viewdef, (select oid from pg_rewrite
where rulename='_RET' || viewname) as view_oid from pg_views where
viewname = 'ec_subsubcategories_augmented';
I checked the OID ordering patches, but they are not trivial enough to back-port them to the release version. Someone with more understanding of the Postgres source may be able to do it, but I might break something fundamental. If the Debian crew releases the deb packages for 7.1 before 7.1.1 is out, we might be able to snatch the patched version from them (they have a tendency to backport this kind of stuff). Although with just 15 days remaining before the 7.1.1 scheduled release... I don't think it is worth the effort.

OTOH, if you are not too concerned about the need to be able to restore a backup without some manual labor, 7.1.1 will be an update that does not require an initdb. So you could just go ahead and install it.

A work around for this problem might be to first load the OpenACS datamodel, including customization scripts from your 7.0, into 7.1 and then do a 'pg_restore -d your_db --data-only backup.sql' to restore the data. I will try that today or tomorow, if it works I will update my migration guide.

I found that after loading a fresh OpenACS-3.2.5 in 7.1 backup and restore were 100% okay. I am unsure about customizations, though...

Collapse
Posted by Don Baccus on
OK, the fact that a fresh OpenACS 3.2.5 can be restored without change  makes me feel a little better.  I don't know if the datamodel restore  + data restore trick will work, because I don't know if the data-only restore is smart about referential integrity (delaying checks, that is).

Thanks for looking into this, Pascal.