1

I have a PostgreSQL server (9.3.10) already setup for ArcGIS enterprise GDBs with one GDB already in it (created in the past, with ArcGIS 10.3 I believe). I am using ArcGIS 10.5.1 on my client to create another GDB on it and it fails with the below message.

You must copy the latest ST_GEOMETRY library to the PostgreSQL software location. Refer to the ArcGIS help topics for more details. Connected RDBMS instance is not setup for Esri spatial type configuration. Failed to execute (CreateEnterpriseGeodatabase).

Is this a version mismatch issue or bug? What is the work around besides upgrading the PostgreSQL instance (if that is a solution at all).

5
  • you need to do as is says. copy the new ESRI st_geometry dll over to postgresql lib then run create enterprise geodatabase
    – ziggy
    Mar 6, 2018 at 21:04
  • Ziggy is on point. It might help to mention your context and expectations more. It is true that Esri's requirements do vary from database to database, platform to platform. So for Oracle the installation and registration of these .dlls is optional. When installing to Oracle the CreateEnterpriseGeodatabase tool will cluck at you disapprovingly but the geodatabase will install regardless (though with some loss of functionality for SDE.ST_GEOMETRY).
    – pauldzy
    Mar 6, 2018 at 22:29
  • But for PostgreSQL - the DLLs are mandatory to install (the reasons are not that interesting). Well that is unless the CreateEnterpriseGeodatabase tool detects that you are installing to a cloud database service (where its impossible to install any dll). In that case the installer quietly forgoes the requirement for the dll removing the option for SDE.ST_GEOMETRY entirely. You have to then use the PostGIS Geometry or Geography spatial types. Are you staying you have a database to which for some reason you can never gain access to the file system?
    – pauldzy
    Mar 6, 2018 at 22:30
  • As I said, ST_GEOMETRY is already in there. That is my point about the existing GDB in the same instance.
    – Mahdi
    Mar 6, 2018 at 23:22
  • Vince covers the answer well. One side question would whether you are using SDE.ST_GEOMETRY in your workflow of the new geodatabase you are seeking to create. Your issue is at heart how to manage and propagate Esri's SDE.ST_GEOMETRY spatial type. Nothing wrong with that but are you using it? As mentioned if you were on Amazon RDS this entire issue would be moot.
    – pauldzy
    Mar 7, 2018 at 13:00

1 Answer 1

7

TL/DR: You cannot use both 10.3.x and 10.5.x geodatabases in the same non-RDS PostgreSQL instance. You do have other options.

First, some background:

  • PostgreSQL development rules forbid the mixing of DLLs compiled against major revisions (e.g. 9.3 and 9.4). This policy does not apply to minor revisions (e.g., 9.3.4, 9.3.10). There is one extension library location per install, but that location is a compilation flag, so it's possible that different servers will use different locations.
  • Esri only supports three RDBMS snapshots at a time, so ArcGIS 10.3.x supported PG 9.3, PG 9.2, and PG 9.1, and ArcGIS 10.6 only supports PG 9.6, PG 9.5, and PG 9.4
  • ArcGIS uses a dynamic link library (DLL) as a library extension to implement the ST_GEOMETRY datatype. The same name is used for all releases: st_geometry.dll (Windows) or st_geometry.so (Linux). The ArcGIS support libraries are shipped in a folder organization by PostgreSQL release and Windows/Linux, with the DLLs to implement the Esri ST_Raster type in the same folder.
  • Raster support is not a required install, but the sde.gdb_items table populated by CreateEnterpriseGeodatabase_management() and EnableEnterpriseGeodatabase_management() has a geometry column for which the ST_Geometry type is the default implementation, making st_geometry.so required.
  • Amazon RDS instances of PostgreSQL do not permit the Esri ST_Geometry support library to be added, so to support RDS, Esri modified the installer to detect RDS as a special case, using the PostGIS geometry type in gdb_items instead.
  • Starting with ArcGIS 10.4, Esri started allowing ArcMap and ArcCatalog to treat PostgreSQL databases as read-write workspaces, even if no enterprise geodatabase had been created. Editing is restricted, and geodatabase behaviors are not supported, but I've been using such a database for two-plus years, and haven't felt the lack.

Okay, so now we have your situation:

  • There's already an st_geometry.so DLL configured in the PG 9.3 instance
  • Your 10.5.x install st_geometry.so is incompatible with the existing 10.3.x geodatabase. Copying it in over the 10.3 DLL would cause the 10.3.x instance clients to stop functioning.

Your choices, therefore, are:

  • Upgrade the existing 10.3.x server (and all its 10.3.x and higher clients, including ArcGIS Server, if in use) to 10.5.x.
  • Scope back your project to use 10.3.x (at least with respect to the geodatabase) until the other project is ready to upgrade (10.5.x clients can connect to, but not create 10.3.x geodatabses, so the other project's ArcGIS install would need to create your EGDB for you).
  • Use a different PostgreSQL server or create a new PG 9.3 (or higher, up to PG 9.5) instance on the same database server (with other than the default 5432 port). You would need to use a different binary installation, even if you use the same PG minor revision, because the library folder would still conflict across two separate instances.
  • Skip use of enterprise geodatabase in your 10.5.x project, and use all Query Layers with simple feature classes in the new 10.3 database (parallel to the existing instance).

I must admit that I have, as an experiment, run two incompatible releases of ArcGIS in two databases in a single instance. It was not in the least pleasant to do, and it involved unsupportable (and some unnatural) procedures that destabilized the existing database instance. I might be willing to blog about it one day, but there were enough sketchy activities that I have to wait for the relevant statutes of limitations to expire.

2
  • Thank you very much! Great Answer. Is this anywhere in ESRI docs?
    – Mahdi
    Mar 7, 2018 at 15:39
  • It's all in the Esri documentation, somewhere, but not likely put together like this.
    – Vince
    Mar 7, 2018 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.