pgadmin-org / pgadmin-org/pgadmin4

Desktop pgAdmin repeatedly asks for the PostgreSQL password in Query Tool until the local pgadmin4 profile is reset

Open
#10,162 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

Describe the issue

I encountered a strange authentication issue with pgAdmin Desktop.

The initial server connection worked correctly, and I could connect to PostgreSQL without any problem.

However, every time I tried to open Query Tool or View/Edit Data, pgAdmin prompted me for the PostgreSQL password again.

Even though I entered the correct password (the exact same password used to connect to the server), pgAdmin always returned:

FATAL: password authentication failed for user "postgres"

The confusing part was that PostgreSQL authentication itself was working correctly.


Environment
  • OS: Windows 10
  • PostgreSQL: 18.4
  • pgAdmin: 9.15 (Desktop)
  • Authentication: SCRAM-SHA-256
  • Connection: localhost (also tested with 127.0.0.1)

What I verified

Before finding the workaround, I verified all of the following:

  • PostgreSQL service was running correctly.
  • The password was correct.
  • psql connected successfully using the same credentials.
  • Prisma connected successfully using the same credentials.
  • pg_hba.conf was correctly configured.
  • Changing localhost to 127.0.0.1 did not solve the issue.
  • Disconnecting and reconnecting the server worked normally.
  • The problem only occurred when opening Query Tool or View/Edit Data.

This made the error message very misleading because PostgreSQL authentication itself was working correctly.


Workaround

The issue appears to have been caused by corrupted local pgAdmin user data.

Closing pgAdmin and renaming the local profile directory immediately resolved the problem.

Original folder:

C:\Users\<username>\AppData\Roaming\pgadmin4

Renamed to:

pgadmin4_backup

After restarting pgAdmin and recreating the server connection, Query Tool and View/Edit Data worked normally without asking for the password again.


Expected behavior

If the local pgAdmin profile becomes corrupted, it would be helpful if pgAdmin could either:

  • detect the corrupted profile,
  • recreate it automatically,
  • or display a clearer error message instead of repeatedly reporting a PostgreSQL password authentication failure.

The current error message makes it appear that PostgreSQL authentication is failing, while the issue seems to be related to corrupted local pgAdmin state.

If this behavior is expected rather than a bug, it might be helpful to document this troubleshooting step in the official documentation, as it could save users a significant amount of troubleshooting time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure from the Desktop Query Tool and View/Edit Data entry points using the reported Windows and PostgreSQL setup. Then inspect how the local pgAdmin4 profile is loaded and how the authentication failure is surfaced. Done should mean identifying whether corrupted profile state is responsible and defining either targeted recovery or clearer troubleshooting guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.