pgAdmin guide

pgAdmin 4 on Windows — setup, connect & query guide

pgAdmin 4 is the official PostgreSQL GUI, bundled with the Windows installer. This guide covers launching pgAdmin, setting a master password, connecting to your server and running SQL queries.

pgAdmin 4 — the official PostgreSQL GUI for Windows

pgAdmin 4 is the official open-source administration and development tool for PostgreSQL. It runs as a web application in your browser (served locally) and provides a visual interface for managing databases, running queries, viewing data, configuring users and monitoring server activity. It is bundled with the EDB Windows installer, so if you installed PostgreSQL via the standard installer, pgAdmin 4 is already available.

How to open pgAdmin 4 on Windows

  • 1

    Open from Start menu

    Press Win → search pgAdmin 4 → click the result. pgAdmin launches a local server and opens in your default browser. The first launch can take 30–60 seconds.

  • 2

    Set a master password

    On first launch, pgAdmin asks you to set a master password. This password encrypts your saved server passwords within pgAdmin. It is separate from your PostgreSQL superuser password.

  • 3

    Connect to your PostgreSQL server

    In the left panel, right-click ServersRegister → Server. Fill in the connection details:

    pgAdmin — Register Server dialog
    Name (General tab): My Local DB
    Host (Connection tab): localhost
    Port: 5432
    Maintenance DB: postgres
    Username: postgres
    Password: your_postgres_password

    Click Save. The server appears in the left panel — click it to connect.

  • 4

    Browse databases and run queries

    Expand the server → Databases → your database → Schemas → Tables. Right-click any table for quick actions. To run SQL, click Tools → Query Tool.

Run SQL queries in pgAdmin

Open the Query Tool: select a database in the left panel → Tools menu → Query Tool. Type your SQL and press F5 or click the Run button:

pgAdmin Query Tool
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
-- Results appear in the Data Output panel below

pgAdmin tips for Windows users

pgAdmin takes a long time to open
pgAdmin 4 runs a Python web server locally. First launch is slow (30–60 seconds) because Windows Defender and other security software may scan it. Subsequent launches are faster. You can add the pgAdmin folder to your antivirus exclusion list to speed things up.
pgAdmin shows "Unable to connect to server"
Check that: (1) the PostgreSQL service is running (sc query postgresql-x64-18), (2) you are using the correct port (default 5432), (3) the host is localhost for local connections. If you changed the port, update the pgAdmin connection.
I forgot my pgAdmin master password
The master password can be reset by deleting the pgAdmin preferences file. Go to %APPDATA%\pgAdmin and delete pgadmin4.db. Note: this also deletes your saved server passwords — you will need to re-enter them.
How do I update pgAdmin without reinstalling PostgreSQL?
pgAdmin can be updated independently of PostgreSQL. Download the latest pgAdmin 4 installer from pgadmin.org and run it. It updates pgAdmin in place without touching your PostgreSQL installation.

Prefer the command line?

Learn essential psql commands for Windows.

psql commands guide