Skip to content

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

Description

@MohammadZourmand

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions