Hi,
PFA patch to fixed the issue which was introduced with "Named restore
point" functionality in get_nodes function.
Issue: SQL was getting executed without checking database connection
causing invalid node status.
Thanks to Khushboo for reporting the issue.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/browser/server_groups/servers/__init__.py b/web/pgadmin/browser/server_groups/servers/__init__.py
index 180807f..a79f1d4 100644
--- a/web/pgadmin/browser/server_groups/servers/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/__init__.py
@@ -69,13 +69,15 @@ class ServerModule(sg.ServerGroupPluginModule):
manager = driver.connection_manager(server.id)
conn = manager.connection()
connected = conn.connected()
-
- status, in_recovery = conn.execute_scalar("""
- SELECT CASE WHEN usesuper
- THEN pg_is_in_recovery()
- ELSE FALSE
- END as inrecovery
- FROM pg_user WHERE usename=current_user""")
+ if connected:
+ status, in_recovery = conn.execute_scalar("""
+ SELECT CASE WHEN usesuper
+ THEN pg_is_in_recovery()
+ ELSE FALSE
+ END as inrecovery
+ FROM pg_user WHERE usename=current_user""")
+ else:
+ in_recovery = None
yield self.generate_browser_node(
"%d" % (server.id),
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers