diff --git a/docs/en_US/release_notes_3_7.rst b/docs/en_US/release_notes_3_7.rst index 161723fd8..13872dcac 100644 --- a/docs/en_US/release_notes_3_7.rst +++ b/docs/en_US/release_notes_3_7.rst @@ -18,6 +18,7 @@ Bug fixes | `Bug #3083 `_ - Increase the size of the resize handle of the edit grid text pop-out. | `Bug #3354 `_ - Fix handling of array types as inputs to the debugger. +| `Bug #3433 `_ - Fix an issue that could cause the Query Tool to fail to render. | `Bug #3599 `_ - Run Postfix in the container build so passwords can be reset etc. | `Bug #3619 `_ - Add titles to the code areas of the Query Tool and Debugger to ensure that panels can be re-docked within them. | `Bug #3711 `_ - Fix an encoding issue in the query tool. diff --git a/web/pgadmin/utils/driver/abstract.py b/web/pgadmin/utils/driver/abstract.py index 271bfecab..5fe65bc4d 100644 --- a/web/pgadmin/utils/driver/abstract.py +++ b/web/pgadmin/utils/driver/abstract.py @@ -169,6 +169,7 @@ class BaseConnection(object): ASYNC_NOT_CONNECTED = 4 ASYNC_EXECUTION_ABORTED = 5 ASYNC_TIMEOUT = 0.2 + ASYNC_WAIT_TIMEOUT = 2 ASYNC_NOTICE_MAXLENGTH = 100000 @abstractmethod diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py index 6dd73ecd3..2c9fcb5ac 100644 --- a/web/pgadmin/utils/driver/psycopg2/connection.py +++ b/web/pgadmin/utils/driver/psycopg2/connection.py @@ -1335,9 +1335,11 @@ Failed to reset the connection to the server due to following error: if state == psycopg2.extensions.POLL_OK: break elif state == psycopg2.extensions.POLL_WRITE: - select.select([], [conn.fileno()], []) + select.select([], [conn.fileno()], [], + self.ASYNC_WAIT_TIMEOUT) elif state == psycopg2.extensions.POLL_READ: - select.select([conn.fileno()], [], []) + select.select([conn.fileno()], [], [], + self.ASYNC_WAIT_TIMEOUT) else: raise psycopg2.OperationalError( "poll() returned %s from _wait function" % state)