27

I just installed pgAdmin 4 version 3.0.0 for macOS Sierra, replacing the pgAdmin that came bundled with Postgres 10.3 running locally on the same Mac.

I opened the pgAdmin 4.app app icon, which caused Safari browser to come to the front with a tab showing the usual pgAdmin user-interface. Good.

I closed that tab in Safari. Now when I open the pgAdmin 4.app icon (either double-clicking or choosing File > Open), nothing happens.

Is pgAdmin supposed to launch in a browser window rather than in the app's own window?

➡ How to re-open pgAdmin again?

30

“Elephant” icon menu

When pgAdmin is running, an elephant icon menu appears. Look at the upper right corner of the screen. The elephant refers to Slonik, the Postgres mascot.

Choose New pgAdmin Window menu item.

enter image description here

FYI, pgAdmin 4 is built as a web app, not a desktop app, even when run locally on your own computer. Note that the internal web server provided by pgAdmin 4 is running continuously, even after you close all windows. Use the Shutdown server menu item, as seen above, if you want to stop that web server.

p.s. I agree, it is very confusing that clicking the icon does not do the same thing (when pgAdmin is already running).

  • Bingo! I found such a menu with pgAdmin 4 version 3.0. The menu item works. Thank you. – Basil Bourque Jul 12 '18 at 19:13
  • 6
    It's the elephant in the room... that nobody sees. – Brian D Dec 12 '18 at 20:44
7

Update For best solution, see Answer by Burmistrov.

Web browser

As for launching the app causing a page to open in your default web browser, Yes, that is the new normal.

Per an email on the psgsql-announce email sent by Dave Page on 2018-04-13:

The desktop runtime now runs as a system tray application and utilises the browser on the system to display pgAdmin. This resolves numerous bugs and issues caused by QtWebKit/QtWebEngine.

Second launching

As for the app doing nothing when launching after closing the first web browser window, one workaround: Bookmark the URL.

Here is an example of such a URL:

http://127.0.0.1:58353/browser/

The port number, 58353 in the example above, varies arbitrarily. To discover the port in use currently, do a port-scan.

Kill the pgAdmin server process

The pgAdmin 4 app is actually architected as a web app running inside a bundled web server. So the port number listed above is the port on which that bundled web server is listening.

So one workaround to our re-open-app problem is to kill the process of the web server of pgAdmin. Then run the pgAdmin 4 app again to re-launch the bundled web server, re-create the pgAdmin 4 process, and have your default web browser open a fresh window.

screenshot of Mac app Activity Monitor offering to kill the 'pgAdmin 4' process

Alternate tool

Yes, pgAdmin 4 is annoying in this regard and in other regards as well. You may want to pursue using alternate admin tools. There are many to choose.

  • 3
    RE: second launching The only/fastest way I found to get a second launching (short of rebooting) was to terminate the pgAdmin 4 process in Activity Monitor. Then relaunch worked fine, but needed to do this for every relaunch. Bookmarking the URL did not help - it gave an error. – Brian F May 25 '18 at 14:53
  • excellent question with a nice, clarifying answer. – MWiesner May 26 '18 at 22:07
  • 1
    the port 58353 is randomly change. You cannot bookmark – Trinh Hoang Nhu May 30 '18 at 23:33
  • @BrianF Thanks, killing the pgAdmin 4 process is a simple workaround. I added that to my Answer. – Basil Bourque Jun 21 '18 at 4:30
3

After installing pgadmin4-3.0, I removed it and reinstalled pgadmin4-2.1. The issues that this new version resolves are outweighed by the challenges it also introduces, in my view. After reverting to 4-2.1, I received the message "application server could not be contacted" when opening pgAdmin. To resolve this issue, I renamed ~/.pgadmin, but this resulted in losing my saved connections.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.