Question

I'm trying to install Postgresql (8.2.15) additional supplied modules intarray and intagg for my Greenplum database 4.2.1.0. The installation seems successful; I followed the tutorial here and all the files are copied into the greenplumlib-db-4.2.1.0/lib/postgresql share/postgresql directory. but when I tried to execute my java code, it throws an "undefined symbol" error:

org.postgresql.util.PSQLException: ERROR: could not load library "/usr/local/greenplum-db-4.2.1.0/lib/postgresql/_int.so": /usr/local/greenplum-db-4.2.1.0/lib/postgresql/_int.so: undefined symbol: pfree
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:353)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:345)
at tuffy.db.RDB.execute(RDB.java:354)
at tuffy.db.RDB.resetSchema(RDB.java:700)
at felix.main.Felix.parseFelixQuery(Felix.java:106)
at felix.main.Felix.run(Felix.java:755)
at felix.main.Main.main(Main.java:69)

saying that the symbol pfree is undefined. I have checked the version number: both the postgresql in Greenplum and the additional module are 8.2.15. Am I missing something?

Update: The link to the tutorial seems unstable; it basically gives some simple steps to complete the installation:

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]

Update: Thank you for your answer.

I'm installing Greenplum, but it only includes postgresql 8.2.15, so I have to use this version. I have copied the whole /usr/local/pgsql/lib directory to the greenplum library, it seems to get the intarray to work, but now I have a new error:

could not load library "/usr/local/greenplum-db-4.2.1.0/lib/postgresql/plpgsql.so":
/usr/local/greenplum-db-4.2.1.0/lib/postgresql/plpgsql.so: undefined symbol: heap_copytuple 

It seems that I'm missing some files...

Thank you!

Was it helpful?

Solution

You may have missed that PostgreSQL 8.2 has reached end of life in 2011.

Upgrade to a more current version, (latest is 9.1 at the time of writing), where installing the extension (formerly: "additional supplied modules") intarray is a matter of:

CREATE EXTENSION intarray;

The manual about CREATE EXTENSION.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top