Forum OpenACS Q&A: Response to PostgreSQL from scratch

Collapse
Posted by Don Baccus on
The easiest thing to do is to get rid of the SUSE-installed package (/usr/lib/pgsql/*, /usr/bin/pgsql/*, /usr/doc/pgsql/*) and grab the source tarball for PG 7.1.3 from the PG ftp server.

All you need to do is "./configure", "make", then (as root) "make install" and it will be installed in /usr/local/pgsql.

If libraries aren't being found, adding the new library directory to /etc/ld.so.conf and running /sbin/ldconfig (as root) will make them findable.

Looking at your original post, it looks like "createlang" was installed in /usr/bin/pgsql, i.e. from the RPMs but the library didn't make it.  And your reinstall (from source?) put the library elsewhere, i.e. /usr/local/pgsql/lib.  So the createlang you were running was looking in the wrong (RPM-install) place.

The PG folks source builds have forever put the entire product into a single directory subtree, /usr/local/pgsql (by default, you can change this, useful for running multiple versions).

The file system standard followed by many linux distros is to put binaries under /usr/bin, libraries under /usr/lib, i.e. scatter a product's pieces rather than gather then in one place.

Which is better?  Who cares, they're different, that's what's important.  A mix-n-match installation is hard to get right because of this.

Thus my advice - strip out the scattered /usr/bin, /usr/lib etc PG pieces and start over.  I always install "the PG way" because distros are always behind the times and until recently PG betas were so much better than previous releases that I'd use them rather than the "official" release.  PG's matured to the point where that's not so true (I'm still running PG 7.1 rather than PG 7.2rc1) but if you ever do want to upgrade from the PG site, it's a lot easier if you've installed it "their way".