How to uninstall PostgreSQL in Windows?

Encountered pgAdmin III error message, saying “An error has occurred: Error connecting to the server: FATAL: password authentication failed for user ‘postgres’”? Or the “Unhandled exception” popped up, warning “An unhandled exception occurred. Press ‘Abort’ to terminate the program, ‘Retry’ to exit the program normally and ‘Ignore’ to try to continue.”? More? Like “ERROR: role’xxx’ cannot be dropped because some objects depend on it. DETAIL: 13 objects in database xxx. 98 objects in database xxx. 117 objects in database xxx. 106/116 objects in database xxx?

To resolve the issue with “connecting to the server: FATAL”, you could first find and check a file, named “pg_hba.conf”, which is located in “/etc/postgresql/8.4/main/”. Highlight the first non-comment item, “Local – all – postgres – ident”; then you enter the psql shell where you will be able to protect or reset the password for the Database user(s) created on your server. To fix or prevent the “Unhandled exception” error from occurring, it’s recommended that you employ psql – run it from the addons or plugins menu in pgAdmin. And to resolve the “objects” error, you can try to run the REVOKE commands via launching the PostgreSQL CLI. You can also search the Help contents in Help menu for more tips, tech information before removing PostgreSQL from your Server or Windows workstation. And if you just do not know to reset your currently modified pgAdmin system or fix the potential problematic one, you should take the following steps to cleanly uninstall PostgreSQL from your Windows or from your server machine. Moreover, if you cannot complete the manual removal option, please download, install and run the smart uninstaller program below to fully uninstall PostgreSQL and re-install it or its newer editions of it at a later date if you need.

How to Completely Uninstall PostgreSQL from Your Machine?

  1. If you had selected the following installation options to psql and Stack Builder 3.1.0, then please check them to completely uninstall PostgreSQL by opening up Add or Remove Programs / Programs and Features; now, please read and follow the detailed steps below to enable you to manually uninstall PostgreSQL.
  2. Note Stack Builder will install the following Add-ons, tools and utilities: the EnterpriseDB pgPhoneHome for Apple iPhone v1.1-2, pg Agent v3.2.1-1, pgBouncer v1.5.1. For Database Drivers: libqb64 v8.4.4-1, Npgsql v2.0.11-1, pgJDBC v9.1-901-1, PgOleDB v1.0.0.20 and psqlODBC v09.01.0100-1; for Database Server: PostgreSQL v8.4.12.1, PostreSQL v9.0.8.1 and PostreSQL v9.1.4.1 (v9.1.3.1 installed) – thus please check your machine/server out to fully uninstall PostgreSQL.

    Note In the "Registration-required and trial products", you will see the EnterpriseDB Solution Pack (contains Migration Toolkit v1.0-4, Postgres Enterprise Manager Agent v2.1.1-2, Postgres Enterprise Manager Client v2.1.1-2, Postgres Enterprise Manager Server v2.1.1-2, Update Monitor v1.0-1 and xDB Replication Server v2.56-5) and EnterpriseDB Tuning Wizard for PostreSQL v1.4-1 will be required to be installed – uninstall and remove them to cleanly uninstall PostgreSQL!

    Note For Web Applications: Drupal 6 v6.19-1, Drupal 7 v7.12-1, mediaWiki v1.17.3-1 and phpBB v3.0.10-1. And for Web Development, this item includes Apache/PHP v2.2.22-5.3.10-1, phpPgAdmin v5.0.4-1 and WaveMaker v6.3.2GA – find and remove these items to fully uninstall PostgreSQL.

    Note Now the Stack Builder 3.1.0 will help you review the “Selected package” by default or you’ve chosen, “Review your selections and choose a download directory if required, and then click the Next button to begin downloading the packages you have selected.”: Drupal 7 v7.12-1, mediaWiki v1.17.3-1, phpBB v3.0.10-1, phpPgAdmin v5.0.4-1, Apache/PHP v2.2.22-5.3.10-1, Drupal 6 v6.19-1, libqb64 v8.4.4-1, Migration Toolkit v1.0-4, Npgsql v2.0.11-1 and more other components I’ve detailed above, which would be downloaded and saved in the "C:\Users\(your username or computer name\AppData\Local\Temp)" by default – Bingo! You may be able to manually delete them later to completely uninstall PostgreSQL.

    Note You may need to remove the Microsoft C++ 2008 Redistributable – x86 9.0.30729.4148 (size, 596 KB) to fully uninstall PostgreSQL. You just do not find them in the programs list? DOWNLOAD this uninstaller pro to detect all the installed programs to thoroughly uninstall PostgreSQL.

  3. Simply, to properly and automatically uninstall PostgreSQL, you can start doing this task by clicking the Start/Home menu, you then click (Settings, for XP end-users and then) Control Panel; click Programs and Uninstall a program or Add or Remove Programs.
  4. To automatically remove or uninstall PostgreSQL 9.1 that’s running on your machine, you highlight it from the “Currently Installed Programs” list, double click it by using an administrative account or other superuser created on your Windows/server system. You may need to wait for seconds for the following Question window appears and then you can gon to uninstall PostgreSQL. See the software information below:
    • Publisher: PostgreSQL Global Development Group
    • Size: 125 MB
    • Product version: 9.1
  5. Then you click Yes button on Question info box below to continue to uninstall PostgreSQL via its default install option, “Do you want to uninstall PostgreSQL and all of its modules?”; and then you need to be very patient while the Setup performs the requested operation to automatically uninstall PostgreSQL.
  6. While you try to uninstall PostgreSQL automatically, you may encounter the Warning window ("The data directory (C:\Program Files\PostgreSQL\9.1\data) and service user account (postgres) have not been removed.") and you can click OK to ignore it -you can open up the following file folder to manually delete the file remains to manually uninstall PostgreSQL and its remains.
  7. Click OK on Info window, “Uninstallation completed”.
  8. Click Yes on Question window, “To complete the uninstallation, Setup must restart your computer. Would you like to restart now?” – You should exactly follow it to successfully uninstall PostgreSQL.
  9. You may find that the following shortcut file pgAdmin for psql that get left in Desktop, you just need to right click on it and run Delete command on the menu to completely uninstall PostgreSQL.
  10. Select Yes option from Delete Shortcut, informing “Are you sure you want to move this shortcut to the Recycle Bin? Deleting this shortcut does not uninstall the program. If only removes the icon that points to the program. If you want to uninstall use Programs and Features.”
    • Item: pgAdmin III
    • Location: pgAdmin3 (C:\Program Files\PostgreSQL\9.1\bin – If you have any difficulty to remove those program leftovers, use this perfect uninstall tool to thoroughly uninstall PostgreSQL)

  11. Open up Start menu below, locate and right-click on the remaining PostgreSQL 9.1 entry left in Programs list, peform the provided Delete on the menu to fully uninstall PostgreSQL and then you click Yes on Delete Folder, “Are you sure you want to move this folder to the Recycle Bin?”. Then please remember to remove it in Windows Recycle Bin to totally uninstall PostgreSQL.
  12. Select Control Panel > click Uninstall a prgram/Add or Remove Programs. You now remove the possibly useless MS Visual C++ 2008 to completely uninstall PostgreSQL from your system. The whole un-install of C++ should be easy and quick. If your Windows do not let you remove it, then you switch to the following force uninstall option.
  13. Tip Click Yes on Windows UAC to COMPLETELY uninstall PostgreSQL.

  14. Wait till the Windows Installer completes the uninstallation of C++ 2008. Then you can manually detect and clean the following leftover files by the uninstalled programs above, and if you’re new to your system, I do NOT recommend that you manually delete the registry values related with PostgreSQL. Instead, it’s highly recommended downloading the professional & perfect uninstall tool to effectively remove them so that you can safely uninstall PostgreSQL. Watch or review the video demonstration for more useful tips to uninstall PostgreSQL without any unexpected system error(s).
    • HKEY_CLASSES_ROOT\Applications\pgAdmin3.exe
    • HKEY_CURRENT_USER\Software\Classes\Applications\pgAdmin3.exe
    • HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache, C:\Program Files\PSQL\9.1\bin\pgAdmin3.exe – pgAdmin III
    • HKEY_CURRENT_USER\Software\pgAdmin III, EnterpriseDBHelpPath – http://www.enterprisedb.com/docs/en/current/server/, EnterpriseDBPath, GreenplumDBHelpPath – http://www.greenplum.com/docs/3300/, GreenplumDBPath
    • HKEY_USERS\S-1-5-21-1268191406-2149036373-4007080809-1000\Software\Classes\Applications\pgAdmin3.exe
  15. Now, please open Windows Recycle Bin, launch the Empty the Recycle Bin option for the psql files leftovers to cleanly uninstall PostgreSQL: click Yes on Delete Multiple Items, “Are you sure you want to permanently delete these 2 items?”
  16. Save and reboot your device then.

Further Details Related with PSQL Application Errors (Resolution Review)

  • Title: Guru Hint – Server not listen
  • Info: Server doesn’t listen
  • Details: The server doesn’t accept connection: the connection library reports – could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “localhost” and accepting TCP/IP connections on port 5433? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “localhost” and accepting TCP/IP connection on port 5433?

Server doesn’t listen error

Resolution: Check and make sure that your server is running properly, not overloaded or went down. Moreover, you may manually add “tcpip = true to the the postgresql.conf file” for your installed version of psql – 7.3.x and 7.4.x; and for v8.0.x and newer editions of psql, add “listen_addresses=’*'”. And please review the following provided instructions:

  • Tip 1: if you encounter this message, please check if the server you’re trying to contact is actually running PostgreSQL on the given port. Test if you have network connectivity from your client to the server host using ping or equivalent tools. Is your network / VPN / SSH tunnel / firewall configured correctly?
  • Tip 2: For security reasons, PostgreSQL does not listen on available IP addresses on the server machine initially. In order to access the server over the network, you need to enable listening on the address list.
  • Tip 3: For PostgreSQL servers starting with version 8.0, this is controlled using "listen_addresses" parameter in the PostgreSQL_conf file. Here, you can enter a list of IP …

Server denies access error

  • Title: Guru Hint – Server denies access
  • Info: Access to database denies
  • Details 1: The server doesn’t grant access to the database: the server reports.
  • Details 2: FATAL: no pg_hba.conf entry for host “xxx (IP)”, user “postgres”, database “postgres”, SSL on FATAL: no pg_hba.conf entry for host “xxx (IP)”, user “postgres”, database “postgres”, SSL off.

Resolution: You then need to manually “add an entry in the form host template1 postgres xxx (IP)/24 md5 for IPV4 or host template1 postgres ::ffff:xxx (IP)/120 md5 for IPV6 networks” to the pg_hba.conf file saved on your psql server machine.

  • Tip 1: To access a database on a PostgreSQL server, you first have to grant primary access to the server for your client (Host Based Authentication). PostgreSQL will check the pg_hba.conf file if a pattern that matches your client address / username / database is present and enabled before any SQL GRANT access control lists are evaluated.
  • Tip 2: The initial settings in pg_hba.conf are quite restrictive, in order to avoid unwanted security holes caused by unreviewed but mandatory system settings. You’ll probably want to add something like
    • host all all xxx (IP)/24 md5
  • This example grants MD5 encrypted password access to all database to all users on the private network xxx (IP)/24.

Password authentication failed error

  • Tile: Stack Builder Error
  • Details: Failed to open http://get.enterprisedb.com/stackbuilder/drupal7-7.12-windows.exe. Error: A connection to the server could not be established.

Resolution: Check and make sure that the Internet connection or VPN is working properly or fast enough when you’re trying to install the psql’s components shown above. Or you now completely uninstall PostgreSQL and all of its installed components; and then you re-install them later.

RECOMMENDED BLOG ENTRIES ON WINDOWSUNINSTALLER.ORG

uninstall Plone
uninstall GFI LanGuard 2011
uninstall Battlefield 3
Uninstall avast! Free Antivirus 7
uninstall Diablo 3 Beta
uninstall Nero 11

ALSO AROUND THE INTERNET: RELATED WEB SITES

pgAdmin: PostgreSQL administration and management tools
Drupal – Open Source CMS | drupal.org
MediaWiki – Welcome to MediaWiki.org
phpBB – From Wikipedia, the free encyclopedia
Eliminating Web Development Complexity | WaveMaker
SGreenplum is driving the future of Big Data analytics

Recommended Download

Comments are closed.