Thread: Unable to create postgis 2.1.5 extension in PG9.2.8/rhel6

Unable to create postgis 2.1.5 extension in PG9.2.8/rhel6

From
David Markham
Date:

Hi,

 

Many thanks for your efforts in producing these packages for the wider community!

 

For your information, we were seeing a problem creating the postgis extension after installing the postgis2_92-2.1.5-1.rhel6 RPM (from http://yum.postgresql.org/9.2/redhat/rhel-6.6-x86_64/)

 

The error seen with PostgreSQL 9.2.8 installed is as follows:

geodb=# CREATE EXTENSION postgis;

ERROR:  could not load library "/usr/pgsql-9.2/lib/postgis-2.1.so": /usr/pgsql-9.2/lib/postgis-2.1.so: undefined symbol: HeapTupleHeaderGetDatum

 

Reverting to the postgis2_92-2.1.3-1.rhel6 RPM (from the same location) allows this to work as expected:

geodb=# CREATE EXTENSION postgis;

CREATE EXTENSION

 

Further investigation indicated that the symbol in question was added in PostgreSQL 9.2.9, and upgrading our installation from PG 9.2.8 to 9.2.9 resolved the problem.

 

Putting aside whether or not the PostgreSQL API change in 9.2.9 is in line with minor version change guidelines, it suggests that the postgis2_92-2.1.5 packages (and later) should have an RPM dependency of postgresql92 >= 9.2.9 to avoid this error. There may be similar dependencies in other PG release streams, as it looks like that symbol also appeared somewhere between 9.3.0 and 9.3.5 as well.

 

Regards,

David

 

Re: Unable to create postgis 2.1.5 extension in PG9.2.8/rhel6

From
Devrim Gündüz
Date:
Hi David,

Thanks for the report, and analysis. I will update the PostGIS packages
to reflect that. It is bad that I did not catch this before.

I want to note that we always *assume* that people are using the latest
version of everything on their machines -- like we don't support RHEL
6.4 anymore :-)

(When I started building the RPMs around 10 years before, I used to
rebuild each RPM on every PostgreSQL update, since I used to maintain
only a few packages. Now, building each package would take significant
amount of time :-( )

Regards, Devrim

On Tue, 2015-02-03 at 03:35 +0000, David Markham wrote:
> Hi,
>
> Many thanks for your efforts in producing these packages for the wider community!
>
> For your information, we were seeing a problem creating the postgis extension after installing the
postgis2_92-2.1.5-1.rhel6RPM (from http://yum.postgresql.org/9.2/redhat/rhel-6.6-x86_64/) 
>
> The error seen with PostgreSQL 9.2.8 installed is as follows:
> geodb=# CREATE EXTENSION postgis;
> ERROR:  could not load library "/usr/pgsql-9.2/lib/postgis-2.1.so": /usr/pgsql-9.2/lib/postgis-2.1.so: undefined
symbol:HeapTupleHeaderGetDatum 
>
> Reverting to the postgis2_92-2.1.3-1.rhel6 RPM (from the same location) allows this to work as expected:
> geodb=# CREATE EXTENSION postgis;
> CREATE EXTENSION
>
> Further investigation indicated that the symbol in question was added in PostgreSQL 9.2.9, and upgrading our
installationfrom PG 9.2.8 to 9.2.9 resolved the problem. 
>
> Putting aside whether or not the PostgreSQL API change in 9.2.9 is in line with minor version change guidelines, it
suggeststhat the postgis2_92-2.1.5 packages (and later) should have an RPM dependency of postgresql92 >= 9.2.9 to avoid
thiserror. There may be similar dependencies in other PG release streams, as it looks like that symbol also appeared
somewherebetween 9.3.0 and 9.3.5 as well. 
>
> Regards,
> David
>


--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment