PgAdmin4 Administration
Creating a PgAdmin4 User
PgAdmin4 requires the user login before use, but it does not use PostgrSQL login credentials. Users must have a pgAdmin4 login to use pgAdmin4.
(But see this pgAdmin4 feature request: https://github.com/pgadmin-org/pgadmin4/issues/6939 Someday, separate logins and related configuration may not be required.)
Overview of PgAdmin4 Logins
PgAdmin4 logins are either Administrator
or User
logins.
The only difference is that Administrator
logins can maintain the PgAdmin4 database of login credentials.
The User Maintenance Dialog
The user maintenance dialog is hard to find. It is reached by way of a drop-down located under your pgAdmin4 login (your email address), which appears in the upper right hand corner of the pgAdmin4 pages.
The "make a new user" operation is also hard to find. It is the "+" sign in the upper right hand corner of the user maintenance dialog.
Configuring the New PgAdmin4 User
A PgAdmin4 user account must be configured before it can be used. Configuration consists of telling PgAdmin4 how to connect to the server. If not configured, the user's "Servers" menu will be empty.
A Postgres role is a required part of a PgAdmin4 server configuration. Therefore people having 2 Postgres logins, one as a regular user and a second as an administrator, must have two PgAdmin4 servers configured. The user must chose the "server" that goes with the Postgres login they wish to use.
To configure a PgAdmin4 user you must login to PgAdmin4 as that user. Because this requires knowing the user's password, as does the password entry step below, it is best if each person is talked through these steps. That way the administrator does not have to know the user's password. If the user's password is revealed to the administrator the user should afterwards change their password. Regardless of who does the driving, after logging in, follow these steps:
- Create a new server
- Right click on "Servers" and choose "Register" -> "Server...", in the menu bar which runs down the left side of the page.
- Give the server a name
- In the "General" "tab" of the dialog box enter "SokweDB Server". This is the name the server will have in the PgAdmin4 interface. If the login you plan to associate with the server is an administrative login then instead enter "SokweDB Server (as administrator)".
- Enter the PG connection parameters
- In the "Connection" tab, for "Host name/address" enter "sokwe-dbs.postgres.database.azure.com". For "Username" enter the user's Postgres login name. For "Password" enter the user's Postgres password.
- Save the server
- Click the "Save" button.
Maintaining the PgAdmin4 Software Stack
PgAdmin4 runs in a Python] virtual environment. See the Maintaining Python Virtual Environments page for instructions.