8

I am trying to query a remote database that I am connected to, however am having issues 'connecting' to the database with the Query Tool. The Query Tool opens, however the 'plug' icon stays red and doesn't seem to connect to the database (see picture below).

pgadmin query tool screenshot

I'm not sure if that is the best way to describe it, however hopefully attached picture makes sense.

Is there a reason that this is occurring? I have left it to load overnight, etc. in case it is just waiting to connect with remote database but it still does not connect.

Thanks in advance

bellingc
  • 81
  • 1
  • 3
  • 1
    can you use psql command? in cmd.. – dwir182 Oct 23 '18 at 07:36
  • Yes, I can make a query using psql – bellingc Oct 23 '18 at 08:36
  • 1.Delete existing server on pgAdmin 2. Stop the postgres service 3.Create new server, Try connecting to db from pgAdmin(It should fail) 4.Start postgres service 5.Try connecting again(This should pass) and you should be able to query – rdj7 Oct 24 '18 at 16:58
  • 5
    @bellingc Are you perhaps hosting your DB on Heroku/AWS? I have this problem with DBs hosted on Heroku, and I have a suspicion that it's something on the server side that's causing this, because I run pgAdmin on multiple different machines, and when this happens on one it also happens on the other. It appears to be completely random and just "fixes itself" after an indeterminate amount of time... Something else you can try: File > Preferences > SQL Editor > Display > Open in new browser tab. I made this change recently, but it's still too early to tell if it helped. – maltem-za Nov 01 '18 at 14:53
  • I'm seeing exactly the same issue trying to connect to databases at heroku. – Rtype Jan 10 '19 at 00:41
  • Did you sort the issue out ?? – Arnab Jan 16 '19 at 10:10
  • @bszom I was really hoping your solution wouldn't work but it seems to have :( . I even tried disabling the open in new browser tab thing after having the query tool work in that tab and it stops works... no idea why – Will Feb 04 '19 at 21:50

2 Answers2

1

I had the same problem for months. But I found that the issue would be resolved when we download and install pgAdmin 4 v4.2 .If a VPN is needed to connect to your remote database, makes sure that it works fine in your computer.

The download link is: https://www.pgadmin.org/download/

Sampath kumar
  • 91
  • 1
  • 4
0

We had a similar problem with 3.x. In our case, upgrading to 4.4 did not solve the problem until we restarted the computer (MacOSX); although we had stopped the local server before upgrading.

brunj7
  • 149
  • 1
  • 8