22 сент. 2023 г., в 14:20, Luca Ferrari <fluca1978@gmail.com> написал(а):
Checked few sources, can not seem to find reasoning behind this limit:
You must have superuser privileges to use the debugger.
What is the reason?
I suspect the debugger will need to open a connection back to pgadmin,
and that probably is the need for privileges.
Not sure.
I’ve collected log for supseruser debug session under IntelliJ plugin.
Playing this under non-privileged user... some commands pass (below for history) and this one does not:
SELECT * FROM pldbg_set_global_breakpoint(1, 65695, -1, NULL);
ERROR: must be a superuser to create a breakpoint
I am wondering why is this, why not allow debugging for non-privileged users?
PAF
P.S. those that pass are
SELECT setting
FROM pg_settings
WHERE name = 'shared_preload_libraries';
SELECT * FROM (SELECT
t_namespace.nspname,
t_extension.extname,
t_extension.extversion
FROM pg_extension t_extension
JOIN pg_namespace t_namespace ON t_extension.extnamespace = t_namespace.oid)q;
SELECT * FROM (SELECT pid,
application_name,
usename,
client_addr
FROM pg_stat_activity
WHERE application_name = 'idea_debugger'
AND pid <> pg_backend_pid())q;
SELECT * FROM pldbg_create_listener();