Videos / Other Resources

No attachments were found.

Reinstall PostgreSQL 8.4 while preserving database

The following FAQ guides you through the PostgreSQL install process when you have already installed PostgreSQL 8.4 and are trying to preserve your old Database.


Note:  You must install the same version of PostgreSQL the old database was stored in i.e Version 8.4.

Note:  If you are installing on a new/reformatted computer and trying to recover your database you need to also copy/pastethe parent \Database folder over as well.  C:\Users\{username}\AppData\Roaming\HoldemManager\Database should be put in place BEFORE you proceed with step 4.


Note: If you fail to recover your old Database, you can build it again by importing your Archived Hand History files or by exporting your hands.


Note:  To be perfectly honest, it's hit and miss if you're able to recover your old database.  We highly suggest you make sure your old Hand History files are backed up just in case.




To re-install PostgreSQL 8.4, do the following:

1.  Uninstall PostgreSQL

2.  Download version 8.4 from here, or whatever version you have installed.

3.  Go to start > programs > accessories > click on command prompt
(If your using Vista or Windows 7 and have UAC enabled you’ll need to do the following before clicking on command prompt:  right-click on command prompt and chose  run as administrator).

In the dos window that appears type the following and press return:
net user postgres /delete


4. Select Next and choose the path where you would like to install the PostgreSQL directory, PostgreSQL is installed at C:\Program Files\PostgreSQL\8.4 by default, but you can install it at another location by clicking on Browse and choosing a new path. If space is a concern, consider installing PostgreSQL on a drive with extra space as PostgreSQL can use up a couple of GB's depending on the database size.

5. This part is key to recovering your old database, first when you get to the Data Directory screen click on the browse button to locate the previous data folder so you can reconnect to your old database rather than create a new one. You'll notice that when you uninstall PostgreSQL it creates a backup in the Program Files/PostgreSQL folder, each one usually contains the date of the backup, in the example below we see 2 backups from April 4th and 26 June 2011, navigate to the one you want to restore and select the data folder within that folder and press next.

Note: If you used the standalone PostgreSQL installer it might not create a backup folder and instead the database may be just stored in the C:/Program Files/PostgreSQL/8.4/Data folder.





6.  You should then see this screen, click on Next.




 7. You must then enter the password you created for PostgreSQL for the database your trying to connect to, by default it will be postgrespass, other options if that doesn't work are dbpass or h0ld3mManag3r!


If you can't remember the password and get the incorrect password message like above and none of the passwords above work you can try to set PostgreSQL to accept any password by doing the following:

  • Go to the data folder of the folder you are try to reconnect to as outlined above in step 5, move the pg_hba file in that folder to your Desktop and open it with notepad.
  • Scroll to the bottom and change all md5 to trust. Save and close the file.
  • Move the file back to the same data folder.
HM will accept any password now.


8.  Press next on the ready to install screen and PostgreSQL will begin installing, once the installation is complete untick launch stack builder at exit and press Finish.  You should now have access to your old database once again. If you receive any errors during installation please either take a screenshot or write down the exact error and report it to us.








| More

Related Articles

User Opinions (9 votes)

77% thumbs up 22% thumbs down

How would you rate this answer?

Thank you for rating this answer.