You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I found is that it does not auto failover to the primary when the read replica can not be connected (Host exist but not respond). It will just print out error write CONNECT_TIMEOUT host2:5432 and stuck
We're experiencing similar issues attempting to target read-write. It almost seems as if target_session_attrs is being ignored because no matter what, the first host listed is always targeted regardless of that host being in read-only or read-write state. We have to switch the order of the two values manually for the switch to occur. We're using Postgres.js 3.4.3 and Postgres 16.2.
It really looks like target_session_attrs: 'read-write' is ignored if 1st host is not primary: PostgresError: cannot execute INSERT in a read-only transaction.
But target_session_attrs: 'primary' seems to be working as expected.
We have 2 DB instances: a primary instance
host1:5432
and a read replicahost2:5432
Here is my config:
What I found is that it does not auto failover to the primary when the read replica can not be connected (Host exist but not respond). It will just print out error
write CONNECT_TIMEOUT host2:5432
and stucksame issue with primary
it will suck on error
write CONNECT_TIMEOUT unresponsive-host:5432
Auto failover seems only work if host does not exist or host refuse connection
The text was updated successfully, but these errors were encountered: