pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Petrossian <alexander.petrossian@gmail.com>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: Александр Петросян <paf@yandex.ru>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: debugger from superuser only.... why?
Date: Fri, 22 Sep 2023 14:28:22 +0300
Message-ID: <086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com> (raw)
In-Reply-To: <CAKoxK+4AsQCWNLriWeo3R2G9fuGcxyC=eWijb4H6eN3N8ymBJg@mail.gmail.com>
References: <6006191695187640@mail.yandex.ru>
	<CAKoxK+4AsQCWNLriWeo3R2G9fuGcxyC=eWijb4H6eN3N8ymBJg@mail.gmail.com>

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();

view thread (12+ messages)  latest in thread

Message-ID: <086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com>
Permalink:  ../086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com/
Also on:    postgresql.org/message-id/086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alexander.petrossian@gmail.com, fluca1978@gmail.com, paf@yandex.ru
  Subject: Re: debugger from superuser only.... why?
  In-Reply-To: <086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com>
  References: <6006191695187640@mail.yandex.ru> <CAKoxK+4AsQCWNLriWeo3R2G9fuGcxyC=eWijb4H6eN3N8ymBJg@mail.gmail.com> <086C5BA0-7B8F-42EE-ABEC-3EF403D1599B@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox