Ensuring a complete uninstallation of PostgreSQL after a botched instal Windows)l

1

I recently attempted to install PostgreSQL on a Windows XP SP3 machine using the EnterpriseDB installer. The installation was not successful, probably because I did not remember to turn off my antivirus (MS Security Essentials). So I ran the uninstaller that was installed by the installer, removed a leftover object in my user account, turned off the antivirus and reset a firewall exception for the port and the process, and re-downloaded and re-ran the installer.

After this I have not been able to start the server using any of the standard methods. A helpful person on the EnterpriseDB Installation forum looked over the installation log for my second installation attempt and said that the installer was running in “upgrade mode”, apparently because the installer found some trace of the previous installation not removed by the uninstaller. See posting, here, for his comments and the complete installation log: http://forums.enterprisedb.com/posts/list/3879.page

What is the likely cause of a failure to completely uninstall such as this one? How can I either: 1) assure that the next time I run the uninstaller it runs to completion, or 2) check whether it has removed everything and remove any leftovers manually?

I think to do the latter I would need a complete list of all the places that the installer touches.

I would be grateful for any help or suggestions that anyone could offer.

Sincerely, andrewH

andrewH

Posted 2014-02-15T05:05:32.337

Reputation: 195

Do you need something that EnterpriseDB is offering that's not available in the free PostgresSQL? – jdigital – 2014-02-15T06:03:24.170

@jdigital EnterpriseDB publish installers for regular PostgreSQL on Windows, too. They're currently the main distribution channel, since Command Prompt stopped releasing their MSIs. – Craig Ringer – 2014-02-15T06:34:19.820

@CraigRinger You can do a "copy-install" of PostgresSQL, so you don't need to run an installer. However, until you pointed this out, I didn't realize that the zip for that also comes from the folks at EnterpriseDB. It's marked as an option for advanced users. This might help work around an installer problem, at least if you're happy with a simple configuration. – jdigital – 2014-02-15T06:40:24.013

@jdigital Yeah, but it shouldn't really be necessary. It looks like the user has mangled their installation by hand-deleting chunks of it. – Craig Ringer – 2014-02-15T06:44:53.060

Which version did you try to install, exactly? – and31415 – 2014-02-15T17:42:05.800

@jdigital No, I am not trying to install the enterprise version. I am using the EnterpriseDB installer because that is the recommended installation method for Windows on the PostgreSQL site. I was attempting to install version 9.3 – andrewH – 2014-02-17T03:20:13.913

Answers

1

Take a look at the Revo Uninstaller. When uninstalling a program, it attempts to detect files and registry entries that were left behind, and provides you an opportunity to remove them. If you're about to install a program, you can turn on its tracker mode, which will track the installation and allow it to do a more thorough job.

That said, you should always double check what it offers to remove, because it's possible that it may incorrectly identify items for removal.

There's a free version of the program but I think the tracker is part of the paid version. You can check the page on their site that compares the two.

jdigital

Posted 2014-02-15T05:05:32.337

Reputation: 861

Thanks @jdigital. Given that I already have this unsuccessful instalation-uninstalation-reinstalation installed, would you trust this program to find everything without having recorded the installation? I am not asking whether I need to keep it from removing too much - I understand your caution. I am asking if I can count on it to find everything so that I don't just stay in this loop of unsuccess. – andrewH – 2014-02-17T03:32:04.860

No guarantees, you'll just have to try it. – jdigital – 2014-02-17T18:34:23.153

0

If you've mangled an install by hand-deleting things, then run an uninstaller, the uninstaller probably failed to do anything. Windows will generally notice that the program directory containing the uninstaller is missing and simply remove the program entries from the installed programs list in the registry.

This doesn't remove anything else the program might have had, like Windows services, user accounts, registry entries, etc.

Your first try should be to run the installer again, and when it completes, run the uninstaller. Hopefully that'll give it a chance to clean up the leftover remenants of the first install, after which a subsequent install may actually work correctly.

If not, you might need to (carefully) remove the remaining fragments of the hand-deleted install yourself, including the service, installation registry entries, etc etc. If you do this wrong you can make everything worse - make sure you have good backups before attempting a manual cleanup of a busted install.

Craig Ringer

Posted 2014-02-15T05:05:32.337

Reputation: 2 630

Um, actually, I ran the uninstaller before I hand-deleted anything. I think I did mangle the original installation, but by leaving the antivirus turned on, not by hand deletion. I only deleted remnants I found after the uninstall. But I did try and start the service a bunch of different ways, some probably inappropriate, before that. – andrewH – 2014-02-17T03:17:07.683

When you suggest that I run the installer again, do you mean without first running the uninstaller again? Because what I have now, I believe, is an upgrade mode installation on top of an incomplete uninstall of my original botched installation. Will the installer not just repeat what it did last time? – andrewH – 2014-02-17T03:25:44.800