I am using the Create Enterprise Geodatabase tool to create a Geodatabase in postgreSQL. The tool fails with an error
Error creating database. [ERROR: Failed to create postgres database gisdb (-1015).
Error: The Object being referenced does not exist (-1015).
Failed to execute (CreateEnterpriseGeodatabase)
I am using ArcGIS 10.5.1 Desktop for connecting to the database and postgreSQL version is 9.4.8. I have downloaded the postgreSQL DB from the Esri web site. I am able to connect to the database from the system where ArcGIS Client is installed through pgAdmin, so connection is not an issue.
I have copied the st_geometry dll files in the required directory as well, so that should not be an issue.
I have tried all possible options, with no luck, any idea what am I missing here
Got the problem resolved. The issue with PostgreSQL is that everything in the DB should be in the lower case. ArcGIS does not accept upper case and mixed cases. In my case my tablespace was named as GIS_DATA. Changing it to gis_data and restarting the service got rid of the problem. Not sure whether this would classify as a bug.
This is expected behavior:
Type the database name in lowercase; upper- and mixed-case object names are not supported for geodatabases in PostgreSQL. If you type a database name in upper or mixed case, ArcGIS converts it to lower case.
Create a geodatabase in PostgreSQL on Linux—Help | ArcGIS Desktop
Not the database, even the tablespaces have to be in lower case. I took care of the database, but missed out on the tablespace name.
Also the error message was pretty cryptic, took a while to understand what the real issue is.