Closed prime-minister-of-fun closed 1 month ago
I tried 8.10 and had the same problem.
I narrowed the problem down. The nature of the issue needs a little explaining.
Patroni is the orchestrator of the PostgreSQL cluster. One of the nodes had fallen behind too far and could not rejoin the cluster. What happens in this scenario is PostgreSQL server is listening, but not able to serve read-only queries. The PostgreSQL server responds with the "hot standby" error.
==========|---> host2, replication broken, server listening Host1: leader =| ==========|---> host3, replication working, server listening
It remains the case, I only want to connect to the primary.
Maybe this should be a feature request to ignore servers generating "hot standby" errors when using "Target Session Attribute": read-write or primary.
@prime-minister-of-fun Are you able to connect using psql? The error is coming from PostgreSQL and may not be a pgAdmin issue. Secondly, pgAdmin doesn't intercept PostgreSQL errors. Errors can be in any language or may change with time.
No response from author , hence closing the issue.
Describe the bug Pgadmin4 is running in desktop mode, version 8.9.
Using a comma separated string of hosts and adding the "Target Session Attribute" parameter to either read-write or primary returns an error message. Pgadmin4 is unable to connect to the primary.
Error message:
2024-08-20 11:56:34,972: ERROR pgadmin: Could not connect to server(#3) - 'my-staging-dev'. Error: connection failed: connection to server at "10.3.10.71", port 5432 failed: server is in hot standby mode
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be connected to the primary node.
Error message
2024-08-20 11:56:34,972: ERROR pgadmin: Could not connect to server(#3) - 'my-staging-dev'. Error: connection failed: connection to server at "10.3.10.71", port 5432 failed: server is in hot standby mode
Desktop (please complete the following information):
Additional context In case it matters, this is a multi-user remote desktop session. The error appears if one or more users is on the VM, and using pgadmin. It's an ordeal to get a new version approved for installation. So, if there's a workaround, that would be great.