Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover from pgAdmin 4 upgrade

After following instructions here, pgAdmin 4 fails to connect to the server. It pops up a window entitled Fatal Error with a lengthy list of environment printout followed by an even longer list of exception traces, the most relevant of which seems to be:

Total spawn time to start the pgAdmin4 server: 0.008 Sec
2023-04-26 19:28:32,904: ERROR  pgadmin:    Database migration failed
2023-04-26 19:28:33,031: ERROR  pgadmin:    Traceback (most recent call last):
  File "C:\Users\Paul\AppData\Local\Programs\pgAdmin 4\v7\python\lib\site-packages\sqlalchemy\engine\base.py", line 1964, in _exec_single_context
self.dialect.do_execute(
  File "C:\Users\Paul\AppData\Local\Programs\pgAdmin 4\v7\python\lib\site-packages\sqlalchemy\engine\default.py", line 748, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: duplicate column name: shared

There is a Configure button on the dialog that offers the option of changing the timeout period, or to specify a fixed port number, neither of which have any obvious positive impact.

Is there anything I can do to recover from this, or should I just reinstall PostgreSQL from the ground up? I believe I have PostgreSQL 12.3 installed.

EDIT: I uninstalled PostgreSQL and reinstalled the latest version; the issue persists :-(

like image 213
omatai Avatar asked Sep 10 '25 03:09

omatai


1 Answers

The simplest solution currently is to delete a corrupted file %APPDATA%/pgadmin/pgadmin4.db, but you will lose all your previous config source

like image 153
FiruzzZ Avatar answered Sep 13 '25 05:09

FiruzzZ