Re: PostgreSQL uninstall fails - Mailing list pgsql-general

From Craig Ringer
Subject Re: PostgreSQL uninstall fails
Date
Msg-id 4EBC9420.9070502@ringerc.id.au
Whole thread Raw
In response to Re: PostgreSQL uninstall fails  ("J.V." <jvsrvcs@gmail.com>)
Responses Re: PostgreSQL uninstall fails  ("J.V." <jvsrvcs@gmail.com>)
List pgsql-general
On 11/11/2011 06:18 AM, J.V. wrote:
> yes, this is on windows.
>
> Currently removing the data directory and the postgresql user is not
> optional. It fails and does not remove those two items.
>
> There must be 30+ registry keys still there as well.
>
> What I am looking to do is to delete any registry entry:
>
>  1. that has a data value matching the pattern '*postgres*'
>  2. that has a directory value matching the pattern '*postgres*'
>  3. that has a key name matching the pattern '*postgres*'

I think that's a _bad_ idea for several reasons:

- More than one PostgreSQL version can be installed concurrently

- Other products include the name-part "postgres", such as
   "Postgres Plus" among others.

- The installer cannot tell whether any other users of the mu
   "postgres" user account remain. A PgAgent install may still
   be present even after PostgreSQL has been uninstalled, for
   example, and the user won't want it uninstalled especially
   if they're about to reinstall PostgreSQL. Also, when more than
   one Pg version is present it's hard to be certain whether the
   running uninstaller is the _last_ one on the system and should
   remove the "postgres" user account.


I don't think the usual uninstaller should behave as you describe. That
said, I do see value in a "clean" uninstall option that strips out
everything at the risk of possibly breaking parallel installs of other
products or PostgreSQL versions.

I guess in an ideal world PostgreSQL installers and uninstallers could
refcount so they knew when the last product was uninstalled. In
practice, people can't be relied on to use uninstallers properly, 3rd
party products won't manage the refcount properly, etc, and it'll land
up breaking things.

--
Craig Ringer

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Fedora 16 note...
Next
From: Craig Ringer
Date:
Subject: Re: (bez temata)