Fix an issue that could cause the Query Tool to fail to render. Fixes #3433

This commit is contained in:
Khushboo Vashi 2018-12-13 11:15:55 +00:00 committed by Dave Page
parent dfbb2212c0
commit e666b0fab0
3 changed files with 6 additions and 2 deletions

View File

@ -18,6 +18,7 @@ Bug fixes
| `Bug #3083 <https://redmine.postgresql.org/issues/3083>`_ - Increase the size of the resize handle of the edit grid text pop-out. | `Bug #3083 <https://redmine.postgresql.org/issues/3083>`_ - Increase the size of the resize handle of the edit grid text pop-out.
| `Bug #3354 <https://redmine.postgresql.org/issues/3354>`_ - Fix handling of array types as inputs to the debugger. | `Bug #3354 <https://redmine.postgresql.org/issues/3354>`_ - Fix handling of array types as inputs to the debugger.
| `Bug #3433 <https://redmine.postgresql.org/issues/3433>`_ - Fix an issue that could cause the Query Tool to fail to render.
| `Bug #3599 <https://redmine.postgresql.org/issues/3599>`_ - Run Postfix in the container build so passwords can be reset etc. | `Bug #3599 <https://redmine.postgresql.org/issues/3599>`_ - Run Postfix in the container build so passwords can be reset etc.
| `Bug #3619 <https://redmine.postgresql.org/issues/3619>`_ - Add titles to the code areas of the Query Tool and Debugger to ensure that panels can be re-docked within them. | `Bug #3619 <https://redmine.postgresql.org/issues/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 <https://redmine.postgresql.org/issues/3711>`_ - Fix an encoding issue in the query tool. | `Bug #3711 <https://redmine.postgresql.org/issues/3711>`_ - Fix an encoding issue in the query tool.

View File

@ -169,6 +169,7 @@ class BaseConnection(object):
ASYNC_NOT_CONNECTED = 4 ASYNC_NOT_CONNECTED = 4
ASYNC_EXECUTION_ABORTED = 5 ASYNC_EXECUTION_ABORTED = 5
ASYNC_TIMEOUT = 0.2 ASYNC_TIMEOUT = 0.2
ASYNC_WAIT_TIMEOUT = 2
ASYNC_NOTICE_MAXLENGTH = 100000 ASYNC_NOTICE_MAXLENGTH = 100000
@abstractmethod @abstractmethod

View File

@ -1335,9 +1335,11 @@ Failed to reset the connection to the server due to following error:
if state == psycopg2.extensions.POLL_OK: if state == psycopg2.extensions.POLL_OK:
break break
elif state == psycopg2.extensions.POLL_WRITE: elif state == psycopg2.extensions.POLL_WRITE:
select.select([], [conn.fileno()], []) select.select([], [conn.fileno()], [],
self.ASYNC_WAIT_TIMEOUT)
elif state == psycopg2.extensions.POLL_READ: elif state == psycopg2.extensions.POLL_READ:
select.select([conn.fileno()], [], []) select.select([conn.fileno()], [], [],
self.ASYNC_WAIT_TIMEOUT)
else: else:
raise psycopg2.OperationalError( raise psycopg2.OperationalError(
"poll() returned %s from _wait function" % state) "poll() returned %s from _wait function" % state)