Forum OpenACS Q&A: Running Postgres 7.0.3 and 7.1 on one box HOWTO

I have just finished my first draft of the 'How to run two versions of
Postgres and running yet another OpenACS copy on the same box HOWTO'.
You can find it at <a
href="http://pascal.scheffers.net/openacs">http://pascal.scheffers.net/openacs</a>
It's in SGML-DocBook only, because I didn't get round to figuring out
how to configure the conversion tools.
<p>
I do not know how to convert an existing OpenACS
database from 7.0.3 to 7.1. It seems that pg_dump(all) is somewhat
broken, and I could not find an updated version. There were some other
threads on the subject, but I haven't had time to check them all out.<p>
I haven't tested loading the OpenACS datamodel in 7.1, if there
are version specific problems, let me know so I can include them.<p>
This is a draft. Suggestions and comments are quite welcome.
Collapse
Posted by Don Baccus on
eek!  I was able to use pgdump to move my PG 7.0 site to a PG 7.1 site  for testing with beta3, this must be a recent breakage.  The PG folks  need to hear about this loud and clear.

I loaded the OpenACS 3.2.4 datamodel into RC1 a few days ago without problem...someone should try 3.2.5.

I'll take a look at the draft, thanks for doing this, Pascal.  Roberto  knows how to run the conversion tools, I think...

Collapse
Posted by Don Baccus on
Oh ... from reading your HOWTO it sounds like the only problem you had  was with the well-known ordering problem with functions that plagues the PG 7.0 (and older) pg_dump.  That's known and can be worked around easily enough, normally by just doing a psql -f postgresql.sql from the OpenACS and then ignoring the dupe define errors you get while restoring your dump.

I would *strongly* recommend that your samples not use /usr/local/pgsql, even though you explain that you'd installed your PG  7.0 elsewhere via the RPMs so had /usr/local/psql free.  If someone forgets and does a little cut-and-paste of your command snippets in order to run them they could easily hose their existing PG 7.0 installation if they installed from source...

There are a couple of minor English language type clean-ups that could be done but this is a draft so I imagine you'll be cleaning it up a little bit later, right?  Or do you want such comments (I'd pass them in e-mail rather than clutter up the bboard).

To convert from DocBook to HTML I just followed the LDP-AuthorGuide from linuxdoc.org. I am using the ldp.dsl and following everything else as they explain there, especially in this page <a href=http://www.linuxdoc.org/LDP/LDP-Author-Guide/usingldpdsssl.html>http://www.linuxdoc.org/LDP/LDP-Author-Guide/usingldpdsssl.html</a>.

<p>I had to slightly change my path on the command (/usr/lib/sgml/stylesheet instead of /usr/lib/sgml/stylesheets) but since Debian follows the Linux-FHS pretty closely, I had no other problems.

<p>I keep wanting to modify the PostgreSQL documentation tools and integrate them into a nicer system that can be reused (right now it's very PG-specific). The PG team made a set of makefiles that make generating the different formats a snap, but they use some styleshoots and paths that are very different from the FHS.

<p>I'd like to create a system (probably in Python or Tcl/Tk) where you can just pick the files and generate a book from that set of files, then it would generate the makefiles for you, so next time you could just do "make html" or "make pdf".

Don, the conversion works just fine now. I updated the plpgsql.so file
location in postgres.sql and sourced both the postgres.sql and the
backup psql script. I think we should add this restore method to the
backup section of the ACS getting started guide, for the time being.

And yes I am interested in comments about my English, I hate to write
euro-speak documents. I consider my English to be quite good, but am
by no means a native speaker. I shall not be insulted by your
corrections :) I like the documentation to be as error free as
possible. I removed some very obvious errors (mostly artefacts from
restructuring paragraphs) and rewrote some sentences. I have a
tendency to write in the passive voice, so if I am overdoing that, ...
send me an email.

I will upload a revised version later today (I am in CET zone, so
probably your early afternoon), this time in both SGML and HTML.
Thanks for the pointer to LDP, Roberto, can you add that to the README
in the documentation source?

In this revision I have changed the samples to read /usr/local/psql,
not pgsql, as that is indeed a very dangerous choice. The correct
procedure to reload your data has been added and some pointers on how
to install a fresh OpenACS in the new database. I was pleasantly
surprised, BTW, the new driver seems to access the 7.0.3 version
without any problems, is it supposed to be able to do this?

Title suggestions are quite welcome, I think it has become more of an
'howto safely upgrade' than just a dual-install guide.

Collapse
Posted by Don Baccus on
How about "Migration from Postgres 7.0 to 7.1 HOWTO" ???

As far as the English language changes I had in mind they were mostly simple, so my guess is that your cleanups probably got them all.  I'll  try to take another look soon, though.

I have just uploaded a much improved version. It is much more
readable, partly because it is also available in HTML form. It's at
http://pascal.scheffers.net/openacs, please fire me if I got something
wrong :)