I have a web service in Gin that calls Postgresql running on AWS RDS with multi-az failover. When I reboot with failover the primary database and failover starts calls to the web service hang without even getting to the event handler. Once the failover is complete calls to the web service fail due to not being able to find the Postgresql table. If I restart the web service then calls to the web service succeed.
I've done this with both sql/db and the github.com/jackc/pgx/v5/pgxpool connection pool. I hoped the pgxpool would be resilient enough to reconnect once multi-az failover had completed, but this isn't happening. I could implement retry logic which would probably require a new connection, but the calls that hang don't even get to the event handler. Is there a pattern for supporting continuing connection or reconnect to Postgresql when failover happens? Are there drivers or packages that implement this? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/cd128ea3-1cdd-441a-a9cd-4f7519997836n%40googlegroups.com.