Installing a contrib module for Greenplum

March 12, 2010 at 12:49 AM | categories: linux | View Comments

Installing a contrib module for Greenplum must be a dead simple task, because it was no where to be found in the otherwise comprehensive Greenplum Admin Guide.

However, google for "greenplum contrib" only returns one relevant result to a Chinese blog post, which despite best intention, only serves to discourage a newbie like me from ever trying to install a contrib. Recompiling postgresql and hand-editing Makefile just to install a small module? That just doesn't sound right, even for a Gentoo user.

After some messing around with a few contrib, I finally found the right way, which is indeed dead simple:

  1. Get any of the postgresql 8.2 source package from the official site
  2. su - gpadmin
  3. Unpack the source, then go to ~/postgresql-8.2.xx/contrib/xxx
  4. make USE_PGXS=1 COPT="-Wno-error" install
  5. (Optional for Greenplum MPP) Use gpssh to copy whatever .so file that just get installed under /usr/local/greenplum-db/lib/postgresql to other nodes
  6. psql -f xxx.sql [DBNAME]

There you have it. Simple, no fluff, even an Ubuntu user can get it to work (seriously, I am not joking).

blog comments powered by Disqus