I've been using, reluctantly, pgAdmin4 for the last couple of years or so.
And only because pgAdmin 3 became almost unusable with the recent PosgreSQL
versions. But at times, like when needing to view the list of active
sessions, pgAdmin 3 still is a better tool, even after all these years (I
mean, the new tool doesn't even show you the SQL of each session in the
session table, so you can't see at a glance what the DB is doing; You have
to manually inspect each session individually. Even using a SQL query on the
sessions table is better than using the pgAdmin 4 UI for this purpose).
Anyway, with the release of pgAdmin4 v5 it seems some steps in the right
direction, towards making it more like pgAdmin 3, have been made. Fore
example the desktop version finally doesn't need a web browser anymore (btw,
how can I change the font size in the v5 desktop version?).
However, going back to the topic, this extremely annoying "master password"
feature is still included in v5. And, when I say it's annoying, I'm not
talking about the use of the word "master", which some people may find
offensive. I'm talking about wasting hours of our lives by having to do
useless stuff repeatedly. This feature annoyed me so much, that part of my
master password is the F word, obviously referring to the feature.
So, today, after upgrading to v5, I tried to find a way to disable this time
waster, which should be opt-in anyway and configurable from the UI. But, for
some unfathomable reason, the PGAdmin devs decided to make us jump though
hoops again, and not allow us to easily disable the "feature". And the
documentation is extremely confusing regarding how to disable it.
To begin, there is a question mark on the master password password dialog,
which brings you to the documentation about the feature which says:
"You can disable the master password by setting the configuration parameter
MASTER_PASSWORD_REQUIRED=False. See Desktop Deployment for more
information."
OK, fine, obviously the option to change the configuration parameter should
be in the UI, shouldn't it? So I go to File -> Runtime -> Configure.
Surprise. It's not there. It's not in the preferences section either. OK,
time to read the Desktop Deployment help section. First of all, the Desktop
Deployment help section immediatly tries to send me somewhere else with:
"See The config.py File for more information on configuration settings."
But I'll ignore that for the time being, and read the rest. Finally, at the
bottom of the Desktop Deployment help page, there is this:
"The configuration settings are stored in runtime_config.json file, which
will be available on Unix systems (~/.local/share/pgadmin/), on Mac OS X
(~/Library/Preferences/pgadmin), and on Windows (%APPDATA%/pgadmin)."
OK, so I open a command prompt and do a "cd %APPDATA%/pgadmin" since I'm on
Windows. This is what I find there:
Since runtime_config.json was mentioned, I list the file in the console:
Hmm. These parameters don't look at all like the one described in the
previous documentation page, about the master password. They are camelCase,
unlike the MASTER_PASSWORD_REQUIRED=False the master password documentation
page suggested I add. They are also in JSON format, so probably adding
"MASTER_PASSWORD_REQUIRED": false, or "MASTER_PASSWORD_REQUIRED": "False" to
that JSON is a bad idea, most likely the parameter must be set somewhere
else.
After a bit of Googling and Binging it seems the file I need to modify is a
.py file, not a .json file. However, there are no python files in that
directory. So I finally heed the advice on the documentation to "See The
config.py File for more information on configuration settings."
Since the documentation page for config.py is very long, I try do to a
Control+F on it to find the word "master". Unfortunately, this doesn't work
anymore in PgAdmin v5 since it's not a regular browser window. So I need to
look online for the same documentation, to be able to search it.
After a bit of Googling/Binging, I find this:
https://www.enterprisedb.com/edb-docs/d/pgadmin-4/reference/online-documentation/5.0/config_py.html
>From it:
So, indeed, that file seems to be related to this feature. Also, the
documentation page describes additional related files:
"There are multiple configuration files that are read at startup by pgAdmin.
These are as follows:
config.py: This is the main configuration file, and should not be modified.
It can be used as a reference for configuration settings, that may be
overridden in one of the following files.
config_distro.py: This file is read after config.py and is intended for
packagers to change any settings that are required for their pgAdmin
distribution. This may typically include certain paths and file locations.
This file is optional, and may be created by packagers in the same directory
as config.py if needed.
config_local.py: This file is read after config_distro.py and is intended
for end users to change any default or packaging