I have a database connection to a postgresql database on a non-default port, 5433.
I specify TESTDB,5433
as the instance and I can connect with no errors.
enter image description here
If I open that connection properties again, the Instance is displayed with no port configured: enter image description here
When I hit cancel and the double-click the connection, I connect successfully to the 5433 port (confirmed by checking the server status of the 5433 and seeing the incoming connection). Even after hitting OK
on the Instance without a port...the connection still connects to 5433. Only after expliciting specifying TESTDB,5432
can I switch back to the 5432.
Since both instances have the same data schema (and often the same data), how would an ArcGIS user know which instance he or she is connected to?
1 Answer 1
I've mitigated this issue by:
Put the port number in the name of the connection file as soon as its created.
Add a view that will report system info--the view will be visible in ArcCatalog, so you can see which port you are connected on:
enter image description here
enter image description here
CREATE VIEW public.vw_sysinfo AS
SELECT inet_server_port() AS inet_server_port,
current_database() AS current_database, pg_backend_pid() AS pg_backend_pid,
"current_user"() AS "current_user", version() AS version,
postgis_version() AS postgis_version;
Explore related questions
See similar questions with these tags.
arcpy.Describe()
object with methodconnectionProperties
and propertyinstance
.