Re: Mystery "PostgreSQL 11" server keeps reappearing in pgAdmin 4 nomatter how many times I delete it. - Mailing list pgadmin-support

From richard coleman
Subject Re: Mystery "PostgreSQL 11" server keeps reappearing in pgAdmin 4 nomatter how many times I delete it.
Date
Msg-id CAGA3vBvsao6gjfNgrpQcqvveLEbnLQOX6sOdjy_PCK1YNyTtgw@mail.gmail.com
Whole thread Raw
In response to Re: Mystery "PostgreSQL 11" server keeps reappearing in pgAdmin 4 nomatter how many times I delete it.  (Dave Page <dpage@pgadmin.org>)
Responses Re: Mystery "PostgreSQL 11" server keeps reappearing in pgAdmin 4 nomatter how many times I delete it.
List pgadmin-support
Dave, 

On Tue, Apr 21, 2020 at 4:31 AM Dave Page <dpage@pgadmin.org> wrote:


On Tue, Apr 21, 2020 at 8:57 AM <tutiluren@tutanota.com> wrote:
Ever since I went through the horrible ordeal of trying to update PostgreSQL on Windows (from 11.5 to 11.7, so not even a major version), pgAdmin 4 has started showing a "PostgreSQL 11" server in the list of servers. I've deleted it a hundred times now, but it just keeps reappearing every time I start pgAdmin 4.

I'm not sure how that would be a horrible ordeal. You just run the installer and it upgrades with a few clicks.

Well as someone who had the misfortune of upgrading an SQL_ASCII postgreSQL 9 instance to 10, I can sympathize.  Depending on the particulars, it's _a_ _lot_ more than just "a few clicks". 
 

What is this? How to *actually* remove it rather than "pretend-removing" it? Why is it there at all? I never added any such server to pgAdmin 4, and why would it keep adding it back?

Don't remove it. Rename it and/or change any settings you require, then delete the one you manually added.

Wouldn't it make more sense to have a setting to *not* try and auto-detect existing postgreSQL instances?   
 

If trying to connect to it, it asks for a password. I enter none and connect. It seems to be an identical copy of the actual server. In the comments, it says:

Auto-detected PostgreSQL 11 installation with the data directory at C:\Users\blablabla...

Okay, so pgAdmin 4 auto-detected what I already have as a named server in the list, and keeps adding it back? I don't understand the point. Especially the part where it keeps reappearing when I delete it.

It doesn't know that the server you added is the same connection; you might intentionally have the same server added twice, but with subtle differences in the settings. It keeps track of the ID of the server from the registry, and if it finds a server listed in the registry doesn't exist, it'll auto-add it (and store the ID so it doesn't duplicate it itself).

Correct, and since it has no way of knowing, shouldn't it be up to the user to decide as opposed to forcing the user to work around quirk of the application? 

rik.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: Mystery "PostgreSQL 11" server keeps reappearing in pgAdmin 4 nomatter how many times I delete it.
Next
From: Dave Page
Date:
Subject: Re: Mystery "PostgreSQL 11" server keeps reappearing in pgAdmin 4 nomatter how many times I delete it.