Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnostic Error for non-superuser #149

Open
neopaf opened this issue Sep 19, 2023 · 4 comments
Open

Diagnostic Error for non-superuser #149

neopaf opened this issue Sep 19, 2023 · 4 comments

Comments

@neopaf
Copy link

neopaf commented Sep 19, 2023

Describe the bug
Installed extension pldbgapi, debug works under user superuser. Under other (non-superuser) user -- does not.

Screenshots
Снимок экрана 2023-09-19 в 14 48 58

Additional context
Complaint on shared libraries obviously an error, libraries totally work when I attempt to debug under superuser.
And shared libraries are either loaded or not loaded, that is not user-dependent, right?

IDEA Plugin version 222.3.2

IntelliJ IDEA 2022.3.3 (Ultimate Edition) Build #IU-223.8836.41, built on March 10, 2023

PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

@neopaf
Copy link
Author

neopaf commented Sep 19, 2023

I think the problem lies that for superuser this query:

SELECT setting
FROM pg_settings
WHERE name = 'shared_preload_libraries';

returns results:
Снимок экрана 2023-09-19 в 15 08 01

While for non-superuser it returns 0 lines:
Снимок экрана 2023-09-19 в 15 08 59

@neopaf
Copy link
Author

neopaf commented Sep 19, 2023

Tried other commands that work fine in superuser session:

SELECT * FROM pldbg_create_listener();
SELECT * FROM pldbg_set_global_breakpoint(1, 65695, -1, NULL);

I see this:
Снимок экрана 2023-09-19 в 15 11 14

Maybe it is totally not all right for me to expect Debugger plugin to work from a non-superuser user?

If so, maybe that should be clearly stated so?

Not some weird "Shared libraries" problem?

@neopaf
Copy link
Author

neopaf commented Sep 19, 2023

So it is, documented:

You must have superuser privileges to use the debugger.

Please consider to improve diagnostics for stupid people that don't read TFM?

@ng-galien
Copy link
Owner

Thank you for your feedback and improvement suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants