Monday, February 22, 2016

ArcGIS Server, Postgres and ST_Raster Functions


For the past several weeks I've been working on implementing a back end to ArcGIS Server 10.3.1 that includes data in SDE (yes, it still exists at 10.3.1 but just not as a service like we've been used to for 17+ years now), stored as ST_Raster and ST_Geometry and accessed by SQL. The ArcGIS database libraries work well with Postgres (9.2.9 tested) under Windows 8.1 but ESRI advised that the libraries for Linux are not operational. So, don't waste your time for now. If you must stay with Postgres use PostGIS instead. For the systems architecture we're using at Harvard I am going back to Oracle. The Postgres/ESRI/Linux issues have already cost too much time and since we've got to stick with ArcGIS Server, the Oracle site license comes out as king.

Here's the letter:

Hi Dave,

This is xxxxx with Esri Support. I have done some research with my colleagues and we have logged the following bug:

BUG-000094159: ST_Raster functions crash database connections for PostgreSQL on Linux.

This bug explains why you were seeing the error indicating that the server closed the connection unexpectedly. For the most part, we have found that if you use a ST_Raster function that uses the FROM clause, the database connection will be lost. For example, we expect the following commands to be successful from a Linux box:

SELECT sde.st_raster_getVersionLib();
SELECT st_raster_getVersion();
SELECT sde.st_raster_util_getVersion();

But these will cause the connection to crash:

SELECT describe(raster) FROM bd_alti;
SELECT hasColormap(raster) FROM bd_alti;
SELECT raster_id(raster), hasStats(raster) FROM bd_alti;
Unfortunately, we have not yet found a solution or workaround for this defect, but we are certain that these functions work successfully from a Windows OS. I am hopeful that this issue will be resolved with a service pack of some kind in the next release of ArcGIS.

I'm sorry I cannot provide a workaround for this. I have attached this case to the bug, so I will mark this case as closed for now. You can keep track of the bug status on your My Support page. Of course, if you have any additional questions regarding this issue, please don't hesitate to contact me. 

Thank you,

xxxxxxx
Esri Support Services

(888) 377-4575 (USA)
support@esri.com
http://support.esri.com/en/