One of the main reasons users switch from other relational databases to PostgreSQL is the advanced support for geographic objects included in the PostGIS extension.
Being PostgreSQL specialists at 2ndQuadrant, we have tried to investigate if it was possible (and how) to install PostGIS on the Greenplum Single Node edition. Let’s see how Marco Nenciarini, 2ndQuadrant consultant and a long time Debian developer, tried to do it.
Greenplum Single Node Edition (SNE) is a free version of the Greenplum database, one of the most advanced solutions for data warehousing and analytics, which is based on a shared nothing architecture and allows for data distribution and parallel processing on several nodes (servers).
The Single Node edition of Greenplum is a freely distributed version of Greenplum which can be installed on a single node. On a multi-processor architecture, Greenplum Single Node Edition allows to create multiple segments (usually one per core) and hence to take advantage of parallel processing. Greenplum Single Node Edition can be downloaded for free from the main website.
With Greenplum originally based on a PostgreSQL 8.2 branch, Marco downloaded the latest compatible version of PostGIS with PostgreSQL 8.2: version 1.4.2 (http://postgis.refractions.net/download/postgis-1.4.2.tar.gz).
The system we used was a CentOS Linux 5.5, running Greenplum Database 126.96.36.199. Following PostGIS requirements, we installed
proj4 and GEOS (http://www.argeo.org/linux/argeo-el/5/gis/x86_64/).
yum install gcc yum install make rpm -Uvh http://www.argeo.org/linux/argeo-el/5/gis/x86_64/proj-4.7.0-1.el5.argeo.x86_64.rpm rpm -Uvh http://www.argeo.org/linux/argeo-el/5/gis/x86_64/proj-devel-4.7.0-1.el5.argeo.x86_64.rpm rpm -Uvh http://www.argeo.org/linux/argeo-el/5/gis/x86_64/geos-3.2.2-1.el5.argeo.x86_64.rpm rpm -Uvh http://www.argeo.org/linux/argeo-el/5/gis/x86_64/geos-devel-3.2.2-1.el5.argeo.x86_64.rpm
Unfortunately, the plain
configure/make/make install process for PostGIS did not work straight away. We mainly encountered two types of issues: configuration issues and compilation issues.
The workaround we have developed consists of:
- a wrapper file for the
- a patch for PostGIS
(The files are attached to this entry)
Once you have downloaded and uncompressed PostGIS, patch the source code using the attached patch (
0001-Fix-all-compile-issues.patch). Then place the modified
pg_config file in the PostGIS source directory and launch:
make PERL=$(which perl) make PERL=$(which perl) install
You can perform PostGIS regression tests with:
make PERL=$(which perl) check
Keep in mind that – due to some NOTICE messages raised by Greenplum (which complains about the lack of specification of the distribution key by PostGIS) the test results officially fail. A thorough look at the diff file shows that most of these errors are harmless and can be ignored. We will however continue to test the environment in the next weeks.
Please do not hesitate to let us and Greenplum know about your feedback, even here or on the community support forum. It would be great if PostGIS support could be integrated in Greenplum, and I am confident that Greenplum staff will be supportive.
For the moment we hope this patch will come useful.