pgAdmin 4 commit: Handling the bad/lost connection of a database server
От | Ashesh Vashi |
---|---|
Тема | pgAdmin 4 commit: Handling the bad/lost connection of a database server |
Дата | |
Msg-id | E1beG72-0005Wq-4Z@gothos.postgresql.org обсуждение исходный текст |
Список | pgadmin-hackers |
Handling the bad/lost connection of a database server. Made backend changes for: * Taking care of the connection status in the psycopg2 driver. And, when the connection is lost, it throws a exception with 503 http status message, and connection lost information in it. * Allowing the flask application to propagate the exceptions even in the release mode. * Utilising the existing password (while reconnection, if not disconnected explicitly). * Introduced a new ajax response message 'service_unavailable' (http status code: 503), which suggests temporary service unavailable. Client (front-end) changes: * To handle the connection lost of a database server for different operations by generating proper events, and handle them properly. Removed the connection status check code from different nodes, so that - it generates the proper exception, when accessing the non-alive connection. Fixes #1387 Branch ------ master Details ------- http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=f12d981a9d24d9d3725f7d51d99706fa211c7938 Modified Files -------------- web/pgadmin/__init__.py | 1 + web/pgadmin/browser/collection.py | 3 +- .../browser/server_groups/servers/__init__.py | 57 ++-- .../server_groups/servers/databases/__init__.py | 326 ++++++++---------- .../servers/databases/casts/__init__.py | 48 +-- .../servers/databases/event_triggers/__init__.py | 21 +- .../databases/foreign_data_wrappers/__init__.py | 18 +- .../foreign_servers/__init__.py | 19 +- .../foreign_servers/user_mapping/__init__.py | 19 +- .../servers/databases/languages/__init__.py | 19 +- .../servers/databases/schemas/__init__.py | 14 +- .../databases/schemas/catalog_objects/__init__.py | 13 +- .../schemas/catalog_objects/columns/__init__.py | 13 +- .../databases/schemas/collations/__init__.py | 17 +- .../servers/databases/schemas/domains/__init__.py | 17 +- .../schemas/domains/domain_constraints/__init__.py | 20 +- .../databases/schemas/foreign_tables/__init__.py | 14 +- .../schemas/fts_configurations/__init__.py | 25 +- .../databases/schemas/fts_dictionaries/__init__.py | 21 +- .../databases/schemas/fts_parser/__init__.py | 20 +- .../databases/schemas/fts_templates/__init__.py | 35 +- .../databases/schemas/functions/__init__.py | 24 +- .../databases/schemas/sequences/__init__.py | 43 +-- .../servers/databases/schemas/tables/__init__.py | 29 +- .../databases/schemas/tables/column/__init__.py | 17 +- .../constraints/check_constraint/__init__.py | 14 +- .../constraints/exclusion_constraint/__init__.py | 16 +- .../tables/constraints/foreign_key/__init__.py | 50 +-- .../constraints/index_constraint/__init__.py | 15 +- .../templates/constraints/js/constraints.js | 4 +- .../databases/schemas/tables/indexes/__init__.py | 26 +- .../databases/schemas/tables/rules/__init__.py | 26 +- .../tables/templates/foreign_key/sql/nodes.sql | 2 +- .../databases/schemas/tables/triggers/__init__.py | 31 +- .../servers/databases/schemas/types/__init__.py | 19 +- .../servers/databases/schemas/views/__init__.py | 15 +- .../databases/templates/databases/js/databases.js | 197 ++++++++--- .../servers/templates/servers/servers.js | 372 ++++++++++++++------- .../templates/servers/sql/9.1_plus/stats.sql | 40 +-- .../templates/servers/sql/9.2_plus/stats.sql | 40 +-- .../browser/templates/browser/js/browser.js | 6 +- .../browser/templates/browser/js/collection.js | 22 +- .../browser/templates/browser/js/messages.js | 11 +- web/pgadmin/browser/templates/browser/js/node.js | 63 +++- web/pgadmin/misc/depends/static/js/depends.js | 32 +- web/pgadmin/misc/sql/static/js/sql.js | 29 +- .../misc/statistics/static/js/statistics.js | 29 +- .../static/js/alertifyjs/pgadmin.defaults.js | 143 +++++++- web/pgadmin/utils/ajax.py | 28 +- web/pgadmin/utils/driver/psycopg2/__init__.py | 74 +++- web/pgadmin/utils/exception.py | 42 +++ 51 files changed, 1232 insertions(+), 967 deletions(-)
В списке pgadmin-hackers по дате отправления:
Предыдущее
От: Murtuza ZabuawalaДата:
Сообщение: Re: PATCH/s: RM#1387 - Bad handling of missing connection database server