Postgres Replication with Slony on Solaris

Slony doesn’t compile out of the box on a Solaris 10/OpenSolaris 2008.5 box. Quite frustrating! Even with everything installed, it can’t find libpgport.a. I tried hunting through Google, but had no joy – but I did fix it!

Assuming you’re using Postgres 8.2.9 (that’s the latest shipping version in Solaris 10/OpenSolaris):

  1. Grab the source code for Postgres
  2. Make sure Coolstack 1.3 is installed (or some other copy of readline)
  3. Make sure /opt/coolstack/lib is in your crle path
  4. Make sure you have sunstudio or sunstudioexpress installed and in the path
  5. gtar xjf postgresql-8.2.9.tar.bz2
  6. cd postgresql-8.2.9
  7. CC=cc CXX=CC ./configure --prefix=/opt/postgres \
    --with-libs=/opt/coolstack/lib \
    --with-include=/opt/coolstack/include
  8. cd src/port
  9. gmake
  10. cp *.a /usr/postgres/8.2/lib

Now you’ll be able to make Slony. I’m not saying this is the right way, but it certainly worked for me and I now have it up and running just fine.

0 Comments