vangelo-esristaff

64-bit ArcPy and PostgreSQL at 10.4.1

Blog Post created by vangelo-esristaff Employee on Jul 29, 2016

I wrote some pretty extensive ArcPy scripts for a project that required custom data-loading into PostgreSQL 9.4 using ArcGIS 10.4.  In order to improve performance I created some large dictionary caches, which blew out 32-bit process space limits ("Out of client memory" errors),  so I installed the 64-bit Background Geoprocessing module, changed the Windows batch script path to include "...\Python27\ArcGISx6410.4" and "...\ArcGIS10.4\bin64" (vice "..\Python27\ArcGIS10.4" and "...\ArcGIS10.4\bin") and I was in business.

 

When it came time to upgrade to 10.4.1, I experienced disaster -- My scripts weren't working! I couldn't even connect to PostgreSQL! Eventually, Tech Support walked me to a possible cause, and then I found the real cause: My connections failed because a PostgreSQL support library was missing from ArcGIS10.4\bin64 at 10.4.1.  Unfortunately, the connections didn't fail in a useful way (say, by raising an exception), they sort of silently failed, only raising an exception when I tried to access the connectionProperties of the workspace description (props = arcpy.Describe(pathToDotSDEfile).connectionProperties)

 

So, for the record, the solution is to install a replacement for the missing "libintl-8.dll" library. This can be done by:

  1. Installing a copy of 64-bit PostgreSQL server on all clients, and prepending the bin directory to the PATH
  2. Downloading and extracting the "binaries-only" install of PostgreSQL (or copying the bin directory out of your server, if it's a Windows install), and prependng that to the PATH
  3. Installing ArcGIS for Server 10.4.1, and prepending its Server\bin directory to the PATH
  4. Copying the "libintl-8.dll" file from an ArcGIS  Server 10.4.1 install Server\bin directory into Desktop10.4\bin64
  5. [Haven't tried, but it might work] Copy the "libintl-8.dll" file from a 10.4.0 Desktop bin64 directory (where Background Geoprocessing is installed) into the 10.4.1 bin64 folder [I've been told this *doesn't* work]

 

I'm sure a QFE will come out on this pretty quick, but at least there's lots of workarounds.

Outcomes