How to upgrade pgAdmin 4 on windows?

21,678

Solution 1

I think the best option is to go to "Program and files" -> Select "PostgreSQL" and "Uninstall". Uninstaller will you ask you if you want to uninstall the whole application or only individual components. Select individual components and then select "pgAdmin". This will uninstall pgAdmin from PostgreSQL directory. From now install the latest version pgAdmin only from official website which will install it into: C:\Program Files (x86)\pgAdmin 4\v4

Solution 2

If you Download the installer from here https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.8/windows/

It should automatically install the 4.8 version in (C:\Program Files (x86)\pgAdmin 4\v4) overwriting any existing 4.x version but keeping your server connections and setting.

In your case, the previous install was in a different place, therefore, you ended up having 2 versions.

What I suggest to you is go to control panel and uninstall from there all the versions you have. After that go to the above link, download and install the v4.8 in the default location. Every time there is a new version available just install it and let the installer install it on the default location.

Please note that your pgadmin server connections can be found in %appdata%\pgAdmin.

Note that I have personally just upgraded from v4.5 to v4.8 using this method (installing it in the default location) and it worked like a charm.

Solution 3

Not sure the best approach here. If you update directly pgadmin from: https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.10/windows/ the installation goes into "C:\Program Files (x86)\pgAdmin 4\v4\runtime\pgAdmin4.exe"

Wheras the installation of the whole EnterpriseDB Installer from: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads is installed here: "C:\Program Files\PostgreSQL\11\pgAdmin 4\bin\pgAdmin4.exe"

This looks like a wholly undesirable conflict? And leads to the problem identified by @Anomaly ?

Share:
21,678
Anomaly
Author by

Anomaly

Web developer, primarily in React. lmao this is incredibly out-of-date, but I'm gonna leave it for posterity's sake: I'm a computer science student in undergrad. I love coding and have been doing so since I was a wee tyke in middle school. I also love music, friends, learning things, and reading. I'm most familiar with python, have spent a good amount of time with Ruby, think lisps (lisp/scheme/clojure/etc) are elegant and beautiful if not perhaps eminently useful, have some basic experience with C++ and have written a major semester-long project in Java, can learn and use new programming languages quickly (in no small part due the existence of this site), and am still looking for the Holy Grail of programming languages. People tell me I should learn Scala.

Updated on July 19, 2022

Comments

  • Anomaly
    Anomaly almost 2 years

    I installed pgAdmin 4 as part of the postgres installer for Windows. pgAdmin is now telling me there is a newer version (4.8, > 4.5 which I have). However, there is no built in upgrade functionality that I can see, and when I went to download and run the pgAdmin 4 installer to upgrade, it installed itself in the wrong place, leading to problems.

    At first I tried installing it to the default location (C:\Program Files (x86)\pgAdmin 4\v4), which was incorrect, because the previous installation (from the postgres installer) went to a different location (C:\Program Files\PostgreSQL\11\pgAdmin 4).

    The second time, I pointed it to my existing install of postgres (C:\Program Files\PostgreSQL\11\pgAdmin 4), but it installed itself to a subdirectory there instead (C:\Program Files\PostgreSQL\11\pgAdmin 4\v4), rather than upgrading the existing installation, once again yielding to duplicated installations and problems arising from that. I assume if I go download the postgres installer, it will just reinstall version 4.5 of pgAdmin, though I have not tested this.

    What is the correct method for upgrading a pgAdmin instance originally installed by the postgres Windows installer?

  • Zaffer
    Zaffer over 2 years
    If the major version get updated eg: pgAdmin 4 v5 goes to pgAdmin v6, then it will create two separate installs. You need to uninstall the old one manually.
  • sutan
    sutan about 2 years
    I did this and it works