Обсуждение: cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

Поиск
Список
Период
Сортировка

cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

От
Doug Easterbrook
Дата:
I've discovered that as we migrate a each of our customers from 8.4 to 9.x of postgres, we see that the nubmer of servers always changes from only

Servers (1)
-> PostgreSQL 8.4 (localhost:5432)

to be two servers in the pgadmin list

Servers (2)
-> PostgreSQL 8.4 (localhost:5432)
-> PostgreSQL 9.0 (localhost:5432)


I've seen that before in earlier version upgrades, and it was easy enough to delete one (or so I think).

now, once you have both of these in your list of servers, I find that you can't delete a server by using right -click & delete/drop

I've inspected the postgres preferences and the information stays in the preferences .


When you delete them, it looks like they go away, but when you restart pgadmin, the serve you just deleted comes back.







Doug Easterbrook
Arts Management Systems Ltd.
Phone (403) 536-1205    Fax (403) 536-1210

Re: cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

От
Dave Page
Дата:
On Mon, Jan 10, 2011 at 1:03 PM, Doug Easterbrook <doug@artsman.com> wrote:
> I've discovered that as we migrate a each of our customers from 8.4 to 9.x
> of postgres, we see that the nubmer of servers always changes from only
> Servers (1)
> -> PostgreSQL 8.4 (localhost:5432)
> to be two servers in the pgadmin list
> Servers (2)
> -> PostgreSQL 8.4 (localhost:5432)
> -> PostgreSQL 9.0 (localhost:5432)
>
>
> I've seen that before in earlier version upgrades, and it was easy enough to
> delete one (or so I think).
> now, once you have both of these in your list of servers, I find that you
> can't delete a server by using right -click & delete/drop
> I've inspected the postgres preferences and the information stays in the
> preferences .
>
> When you delete them, it looks like they go away, but when you restart
> pgadmin, the serve you just deleted comes back.

You need to uninstall the old server. Otherwise, pgAdmin will
re-detect it, and add it back to the list.



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

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


Re: cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

От
Doug Easterbrook
Дата:
we do.

on windows, standard procedure on an upgrade is to:
a) dump the database
b) go to add/remove programs and remove the old server (it leaves the database 'data' around)
c) install the new server
d) restore the new database.

in all cases, I get 8.4 and 9.0 databases pointing to the same thing.

once we are sure the customer is running on the windows machine under 9.0, then we go back and delete 8.3 or 8.4
directoryfrom  the program files/postres directory. 

I still cannot, at that time, delete the reference from pgadmin


on OSX, our procedure is similar:

a) dump the database
b) stop the server
c) uninstall the old one (leaves data directory)
d) install the new server
e) config and start the server
f) restore the database
g) test that it works, then remove the old data directory.

We do that for safety just in case we have to rollback and reinstall the earlier postgres version.  Since the old data
directoryis there, being able to revert back if necessary has saved our bacon a couple of times. 


thats how the postgres installer works.   If pgadmin is testing the data directory for existance, then it should
probablytest some other directory like the bin directory to see if its a real installation. 



there is probably also no reason to disallow deleting of a server for any reason.   If I want to delete all the servers
inthe list, that should be a personal choice.     I really like that it adds the new server on upgrade... but the old
shouldbe allowed to be deleted if I wish.   thats the essence of the bug report...  an old server that no longer exists
cannotbe deleted. 




Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug@artsman.com
http://www.artsman.com
Phone (403) 536-1205    Fax (403) 536-1210

On Jan 10, 2011, at 6:11 AM, Dave Page wrote:

> On Mon, Jan 10, 2011 at 1:03 PM, Doug Easterbrook <doug@artsman.com> wrote:
>> I've discovered that as we migrate a each of our customers from 8.4 to 9.x
>> of postgres, we see that the nubmer of servers always changes from only
>> Servers (1)
>> -> PostgreSQL 8.4 (localhost:5432)
>> to be two servers in the pgadmin list
>> Servers (2)
>> -> PostgreSQL 8.4 (localhost:5432)
>> -> PostgreSQL 9.0 (localhost:5432)
>>
>>
>> I've seen that before in earlier version upgrades, and it was easy enough to
>> delete one (or so I think).
>> now, once you have both of these in your list of servers, I find that you
>> can't delete a server by using right -click & delete/drop
>> I've inspected the postgres preferences and the information stays in the
>> preferences .
>>
>> When you delete them, it looks like they go away, but when you restart
>> pgadmin, the serve you just deleted comes back.
>
> You need to uninstall the old server. Otherwise, pgAdmin will
> re-detect it, and add it back to the list.
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support



Re: cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

От
Dave Page
Дата:
On Mon, Jan 10, 2011 at 1:29 PM, Doug Easterbrook <doug@artsman.com> wrote:
> we do.
>
> on windows, standard procedure on an upgrade is to:
> a) dump the database
> b) go to add/remove programs and remove the old server (it leaves the database 'data' around)
> c) install the new server
> d) restore the new database.
>
> in all cases, I get 8.4 and 9.0 databases pointing to the same thing.
>
> once we are sure the customer is running on the windows machine under 9.0, then we go back and delete 8.3 or 8.4
directoryfrom  the program files/postres directory. 
>
> I still cannot, at that time, delete the reference from pgadmin

Sounds like the installer isn't removing a reference for some reason.
What does your registry look like, under
HKEY_LOCAL_MACHINE\Software\PostgreSQL (you can export it, using
regedit)?

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

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


1.12.1 = backup ok, 1.12.2 = backup broken

От
"Belbin, Peter"
Дата:
Hello Dave,

I have to say, thank you for the work you continue to do on pgAdmin3.  It's 'da bomb' for postgresql.


I have recently switched to using 1.12.2, and found that when trying to backup a db that is remote to pgAdmin3 (running
onWindows) using default options, that I see pg_dump complaining that the server is saying there is no such database. 

I reverted back to 1.12.1, and now I am able to backup the database successfully.

The remote pgsql instance is running 8.3.3, for what it's worth, running on solaris/sparc.

Best Regards,
Peter.




Re: 1.12.1 = backup ok, 1.12.2 = backup broken

От
Guillaume Lelarge
Дата:
Le 11/01/2011 23:29, Belbin, Peter a écrit :
> [...]
> I have recently switched to using 1.12.2, and found that when trying to backup a db that is remote to pgAdmin3
(runningon Windows) using default options, that I see pg_dump complaining that the server is saying there is no such
database.
> 
> I reverted back to 1.12.1, and now I am able to backup the database successfully.
> 
> The remote pgsql instance is running 8.3.3, for what it's worth, running on solaris/sparc.
> 

I supposed you tried to dump a database with a mixed case name or with
an uppercase name? if so, this issue has already been fixed.

Thanks.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: 1.12.1 = backup ok, 1.12.2 = backup broken

От
Guillaume Lelarge
Дата:
Le 12/01/2011 00:06, Belbin, Peter a écrit :
> Ah.
> 
> Yes, the DB name had mixed case.
> 
> Great!
> 
> Any idea when the fix will be packaged and available?
> 

Nope, no idea. A rough guess would say in one or two months.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: 1.12.1 = backup ok, 1.12.2 = backup broken

От
"Belbin, Peter"
Дата:
Ah.

Yes, the DB name had mixed case.

Great!

Any idea when the fix will be packaged and available?

Regards,
Peter.



-----Original Message-----
From: Guillaume Lelarge [mailto:guillaume@lelarge.info]
Sent: Tuesday, January 11, 2011 4:56 PM
To: Belbin, Peter
Cc: 'Dave Page'; pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] 1.12.1 = backup ok, 1.12.2 = backup broken

Le 11/01/2011 23:29, Belbin, Peter a écrit :
> [...]
> I have recently switched to using 1.12.2, and found that when trying to backup a db that is remote to pgAdmin3
(runningon Windows) using default options, that I see pg_dump complaining that the server is saying there is no such
database.
>
> I reverted back to 1.12.1, and now I am able to backup the database successfully.
>
> The remote pgsql instance is running 8.3.3, for what it's worth, running on solaris/sparc.
>

I supposed you tried to dump a database with a mixed case name or with
an uppercase name? if so, this issue has already been fixed.

Thanks.


--
Guillaumehttp://www.postgresql.frhttp://dalibo.com


Re: cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

От
Gary Oberholster
Дата:
Dave Page-7 wrote
> On Mon, Jan 10, 2011 at 1:29 PM, Doug Easterbrook <

> doug@

> > wrote:
>> we do.
>>
>> on windows, standard procedure on an upgrade is to:
>> a) dump the database
>> b) go to add/remove programs and remove the old server (it leaves the
>> database 'data' around)
>> c) install the new server
>> d) restore the new database.
>>
>> in all cases, I get 8.4 and 9.0 databases pointing to the same thing.
>>
>> once we are sure the customer is running on the windows machine under
>> 9.0, then we go back and delete 8.3 or 8.4 directory from  the program
>> files/postres directory.
>>
>> I still cannot, at that time, delete the reference from pgadmin
>
> Sounds like the installer isn't removing a reference for some reason.
> What does your registry look like, under
> HKEY_LOCAL_MACHINE\Software\PostgreSQL (you can export it, using
> regedit)?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> --
> Sent via pgadmin-support mailing list (

> pgadmin-support@

> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support

I am having this problem as well when upgrading from 8.3 to 9.2 using the
dump, uninstall, install and restore procedure.

I have found that whenever you use pgAdmin III, it writes it's current state
to the registry under HKEY_USERS\...\Softwaare\pgAdmin.

This includes the list of Servers and databases at the time pgAdmin III was
open at.

When you uninstall PostgreSQL, the pgAdmin registry keys are not deleted. So
when you open it again after the re-install it contains entries for all of
the old (dead) servers/databases.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/cannot-remove-some-items-from-the-server-list-after-upgrade-from-postgres-8-x-to-9-x-tp3334788p5753723.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Re: cannot remove some items from the server list after upgrade from postgres 8.x to 9.x

От
Dave Page
Дата:
On Tue, Apr 30, 2013 at 7:36 AM, Gary Oberholster
<gary.oberholster@vasco.com> wrote:
>
> I am having this problem as well when upgrading from 8.3 to 9.2 using the
> dump, uninstall, install and restore procedure.
>
> I have found that whenever you use pgAdmin III, it writes it's current state
> to the registry under HKEY_USERS\...\Softwaare\pgAdmin.

Right.

> This includes the list of Servers and databases at the time pgAdmin III was
> open at.

Yes.

> When you uninstall PostgreSQL, the pgAdmin registry keys are not deleted. So
> when you open it again after the re-install it contains entries for all of
> the old (dead) servers/databases.

Correct. That's entirely as it should be. We don't remove settings
from HKEY_CURRENT_USER during uninstallation because:

1) The user might simply be reinstalling.

2) The user might have a roaming profile and only be uninstalling from
one machine.

What actually should happen is this:

1) PostgreSQL is installed, which adds registry keys to
HKEY_LOCAL_MACHINE describing the server installation.

2) When pgAdmin is run, it detects those keys and creates a server
registration entry for the user in HKEY_CURRENT_USER.

3) If PostgreSQL is uninstalled, the keys under HKEY_LOCAL_MACHINE are
removed, so the server will not get added for any other users.

4) When the original user re-runs pgAdmin, the server will still be
listed because the PostgreSQL installer cannot remove entries from
HKEY_CURRENT_USER that it didn't create. To remove the uninstalled
server from the tree, the user must select it and hit the drop button.
That'll remove the entries from HKEY_CURRENT_USER.


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

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