Installing a contrib module for GreenplumMarch 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:
- Get any of the postgresql 8.2 source package from the official site
su - gpadmin
- Unpack the source, then go to ~/postgresql-8.2.xx/contrib/xxx
make USE_PGXS=1 COPT="-Wno-error" install
- (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
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).