Hi,
PFA patch to fix the issue in Debugger module where it was unable to start
debugging if 'plugin_debugger' can not found in shared_preload_libraries.
RM#2162
Original patch by: Kit Yam Tse <https://redmine.postgresql.org/users/382>
(who reported the issue)
I just re-based it against current code.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/tools/debugger/__init__.py
b/web/pgadmin/tools/debugger/__init__.py
index 79e5eae..22df207 100644
--- a/web/pgadmin/tools/debugger/__init__.py
+++ b/web/pgadmin/tools/debugger/__init__.py
@@ -207,17 +207,6 @@ def init_function(node_type, sid, did, scid, fid,
trid=None):
" and cannot be debugged."
)
else:
- # If user is super user then we should check debugger library is
loaded or not
- if user['is_superuser']:
- status_in, rid_pre = conn.execute_scalar("SHOW
shared_preload_libraries")
- if not status_in:
- return internal_server_error(gettext("Could not fetch
debugger plugin information."))
-
- # Need to check if plugin is really loaded or not with
"plugin_debugger" string
- if "plugin_debugger" not in rid_pre:
- ret_status = False
- msg = gettext("The debugger plugin is not enabled. Please
add the plugin to the shared_preload_libraries setting in the postgresql.conf
file and restart the database server.")
-
status_in, rid_tar = conn.execute_scalar(
"SELECT count(*) FROM pg_proc WHERE proname =
'pldbg_get_target_info'")
if not status_in: