Re: debugger from superuser only.... why? - Mailing list pgsql-general

From Alexander Petrossian
Subject Re: debugger from superuser only.... why?
Date
Msg-id 086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com
Whole thread Raw
In response to Re: debugger from superuser only.... why?  (Luca Ferrari <fluca1978@gmail.com>)
Responses Re: debugger from superuser only.... why?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
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();

pgsql-general by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: debugger from superuser only.... why?
Next
From: Luca Ferrari
Date:
Subject: Re: debugger from superuser only.... why?