After a PostgreSQL database failover, Informatica is unable to perform write operations. Investigation reveals that the application remains connected to the original leader host (now a read-only standby) instead of switching to the newly promoted primary node.
DWpsql27.so)target_session_attrs=read-write (ineffective)The DataDirect 7.1 PostgreSQL Wire Protocol driver successfully authenticates against the standby node during failover. Unlike more modern drivers, it lacks the logic to parse target_session_attrs=read-write. Since the connection is technically successful (though read-only), the driver does not identify it as a failure and therefore does not attempt to connect to the next host in the AlternateServers list.
Add an InitializationString to your DSN in the odbc.ini file. This string executes an SQL check immediately after authentication. If the node is in recovery mode, it raises an exception, forcing the driver to trigger its failover logic.
Update odbc.ini:
[Your_DSN_Name]AlternateServers=(HostName=secondary_host:PortNumber=5051:Database=your_db)FailoverMode=1InitializationString=DO $$ BEGIN IF pg_is_in_recovery() THEN RAISE EXCEPTION 'Connected to read-only standby node. Forcing failover.'; END IF; END $$;If organizational policy allows, switch to the open-source psqlodbc driver. This driver natively respects target_session_attrs=read-write and will automatically move to the next server in the list if it connects to a read-only standby.
Use a proxy layer (e.g., HAProxy, PgBouncer, or a Virtual IP managed by Patroni). Point the Informatica DSN to the proxy endpoint. The proxy handles the detection of the primary node, removing the need for AlternateServers and client-side failover logic.