Forum OpenACS Q&A: Some notes on load-geo-tables and load-data-model issues

I'm in the process of doing an OpenACS install under LinuxPPC, with PG
7.02. I don't know if this is an OS-version specific issue, but I'll
mention it here so that others can see how I worked around. This has
also been entered in the SDM bug database.

1) load-geo-tables

Running this script successfully created the parents spec'd in
acs_geo_parents.sql, and then hung on looping through the *.ctl files.
I don't know much about PG as yet, but these ctl files seem to be of
the form:

COPY (TABLENAME) FROM stdin USING ... etc

... with the requisite data appended below. The sequence was hanging
waiting for input to stdin. I had a couple of goes at copying and
pasting, but that got old real quick. I'd be interested to know
whether this is the intended behaviour?

Workaround I used was to extract the data (plus EOF marker .) from
each ctl file into a separate appropriately named data file and I
change the ctl file's command to:

COPY (TABLENAME) FROM 'FILENAME' USING ... etc

... which then worked just fine.

2) load-data-model.sql

In order to have the entire sequence work with no errors, I had to
remove the comments at the end of all i directives that had them eg,
what was:

i general-permissions.sql  -- much bigger for ACS 3.2.0

caused an error along the lines of:

"can't find file general-permissions.sql  -- much bigger for ACS
3.2.0"

so I changed it to:

i general-permissions.sql

Again, I'm not sure whether this is OS-specific and whether the psql
parser treats tabs followed by -- differently elsewhere, but here it
treated everything after i as the filename to be picked up.

Hope this helps someone.

Regards
S.

The first is definitely a bug in Postgres, the only issue is whether it is specific to LinuxPPC, or whether something got broken in PG 7.0.2 (I'm running 7.0).

The second problem falls in the same class, either psql is broken specifically under LinuxPPC or PG 7.0.2 has broken comments on  commands.

In the FWIW department, recently MacSlash hosted a discussion on various PPC Linux distributions, and LinuxPPC seemed to cause almost everyone problems.  Yellow Dog and a couple of others seemed to work much better.  Most of the issues were peripheral-related, though, so this probably isn't terribly relevant.

There is a bugs mailing list for Postgres, and these should be reported there.  Folks will try it on non-PPC machines, among other things.  You can find this mailing list by visiting www.postgresql.org, clicking on the "information" link, and from there  "mailing lists".  Unfortunately you have to sign up to submit the bug, but this is the only way they provide to do so.

I'd really appreciate it if you'd take the time to submit these.

I just did a quick check around, and Roberto Mello's running PG 7.0.2 on x86 Linux and hasn't seen the problems you're reporting.

This looks very much like a LinuxPPC or PG on LinuxPPC problem.  Sorry  I can't be more helpful, but if the underlying platform's not working  your life with OpenACS on it is probably going to be a misery...

Submitted to mailto:pgsql-bugs@postgresql.org, as requested.
I have a naive question. LinuxPPC is, AFAIK, basically RedHat recompiled for PPC with some new device drivers written for it and a few bells and whistles (like its own graphical installer) thrown in. I would have thought that porting Postgres to LinuxPPC would be a simple as a recompile and that it ought to run as well as it would on RedHat for x86. What am I missing?
Michael, what you are missing is that while Linux is the same, a) the
maturity of the libraries eg C library, other libraries you link
against may not be as thoroughly debugged b) not as many people use
Linux PPC thus there are not as many "eyes" looking at it.

the very first thing I would do would be to run "ldd" on the Postgres
binaries, and write down which version of each library is used.  Then
check against an equivalent Intel version.  If they are different, try
to get the exact same version that is installed on Intel installed
under PPC.  Read up on how to use LD_LIBRARY_PATH so that you can
easily test changes (man ldconfig should tell you this.).

./././././.    p

Actually, Simon - Ben Adida reports that he's running PostgreSQL 7.0.2  with no problem under LinuxPPC, so you're problem must be due to configuration or something else.

He says it came up just like normal, as did AOLserver and the ACS.

How recent is your LinuxPPC?

It's LinuxPPC 1999 (2.2.6-15apmac), and the configuration for PostgreSQL is completely plain vanilla (I don't know enough about it yet to do anything but follow the installation intructions word for word).