View Full Version : Best way to run HEM and Postgres, or...

04-02-2010, 08:09 PM
...If I could do it all over again.

I just recently installed HEM and Postgres and have only played a few hands - been busy lately. Then I got to thinkin...is there a better way to install and run all this stuff?

So I started looking around here and ran into some interesting ideas: external drive use, secondary internal use, database one one drive, HEM on another, etc. Unfortunately, I really have no idea what I am doing for the most part and am not sure what to do. It may not seem like a big deal, but I wanted to set it up as efficiently and securely as possible.

So, if you could set up your HEM and Database anyway you liked, what would it be? I think I am interested in somehow using a second internal HDD in the best way possible. My database (from a few years of playing with PT) is pretty big and I can imagine that in a couple more years it is going to be become a space issue on my current hard drive. I figured that while I was in the beginning stages and ale to afford a bigger new HDD, that now was the time to make changes when it won't require 4 months of uploading and transfers. LOL!

Thanks for your help! I am anxious to get this set up just right.

Also, I think I read Fozzy saying that it would be good to have the DB on a second internal. Also, he said that it would not be good to have HEM on a secondary external. Makes sense to me. That said, if I were to go grab a large second internal drive - something I could transfer to a new computer when the times comes (which may be soon unfortunately) would it be cool (and wise) to install both postgres and HEM on it (as long as it is an internal HDD)?

OK. Sorry to be so long winded.

04-02-2010, 08:26 PM
Just read in another FAQ that the cleaner the HDD the better, so it sounds like using a secondary internal drive would be best (right?). If this is the case, should I reinstall both HEM and Postgres onto a new internal HDD? Postgres only? All of the above PLUS my poker clients (pokerstars.exe, fulltilt.exe, etc.)?

04-02-2010, 09:24 PM
There are a couple of options, ALL with their own pros and cons. Top 3:
-1 Crazy SSD setup (fast.... but expensive, in facty VERY expensive if you have a very large database)
-2 TWO regular harddisks. One for Windows, one JUST for the postgreSQL database
-3: #1 or #2 in any sort of RAID0 setup.

I'd just go for #2, but you STILL need to frequently backup the SQL database.
And it doesn't really matter to which drive you install the Pokerclients/HoldemManager.

04-02-2010, 10:11 PM
thanks. I will almost certainly go with #2 since I could never afford #1 and I am not even sure what raid and all that is. : )

So, I will have two HDDs with one being the "regular" drive and the other being my "poker" drive where I will install postgreSQL.

Now, is it right to assume that it doesn't matter which drive I install things like HEM on? Does anyone else know if there is an advantage to installing HEM on the second "poker" HDD with postgreSQL or on the "regular" one?


04-02-2010, 11:16 PM
You definitely want your postgresql database (\data folder) on the non-windows drive for performance reasons, but the other programs like HEM and your poker clients wont see any performance increase on a drive separate from windows. The biggest advantage of having your poker programs and database on the non-windows drive is that if anything happens to your windows partition your data should remain safe on the other drive/partition.

04-02-2010, 11:53 PM
OK. Well, I am going to install a new HDD now and once that is working I will reinstall my poker stuff there. Sounds like the best thing for me. While there will be no increaased performance for HEM, etc. on the second HDD, there shouldn't be any decrease, correct?

04-03-2010, 10:53 PM
OK. I reinstalled everything on the new hard drive. At least, I thought I did. HEM and a couple of other poker programs are on the new drive clearly, but it looks as if postgres ended up on the original drive. I assumed that when I chose the new drive for the HEM install it would automatically put postgres there too. I think I was wrong.

Fortunately, I have not yet done any importing, but I would really like to start that asap. So what should I do? Do I need to uninstall and reinstall and look for someplace to choose the new drive location during the installation? I thought i would have seen that, but I may have missed it. It installs automatically with HEM, right? Do I need to just somehow move the program over? Is that possible?

I'm lost. Thanks for any help.

04-03-2010, 11:44 PM
Hold Up!

I may have found my answer. Finally found a thread with a similar problem. Will let you know if it doesn't work.

04-03-2010, 11:44 PM
Uninstall PostgreSQL.

Download the manual PostgreSQL installer from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)
During installation let it install to D:/ of whatever your second drive is called.

04-04-2010, 12:04 AM
Cool. That is exactly what I started doing. Now however I have a new problem. I have found some other people apparently asking the same question but I have not been able to figure out the answers they have been given.

Anyways, it asks for a "password for the database superuser (postgres) and service account (postgres)" I have no idea what these are or what this means. I don't know of any other passwords on my computer except the one I use to login (and that didn't work). Any chance you can help me out here?


04-04-2010, 12:09 AM
Password is postgrespass
if it doesn't accept that:

click on Start and go to Programs -> Accessories -> Command Prompt

* If you are on Vista, rightclick and choose "Run as Administrator".

A black box should appear. Type 'net user postgres /del' (without the quotes) and press enter.

The user is now deleted and you can (re)install PostgreSQL.

04-04-2010, 12:28 AM
You are a good man! Thank you. I have about 20 tabs open with apparent answers to that problem and they all lead in different directions - if any direction at all.

I had tried postgrespass but that didn't work either so I did the command line task you mentioned and then was able to make the password postgrespass and all seems ok now. Well, except one more thing. During the install I got a "non-fatal error" message. It said to look at the temp file for more info. So after it was done, I did. As far as I can tell, here is what it said toward the end of the text file:


Script stderr:
Program ended with an error exit code

Error running cscript //NoLogo "P:\PostgreSQL\8.4\installer\server\loadmodules.vbs" "postgres" "****" "P:\PostgreSQL\8.4" "P:\PostgreSQL\8.4\data" 5432 "1" : Program ended with an error exit code
[22:17:02] Write the data directory to the ini file...
[22:17:02] Write the port number, service ID, locale and superuser to the ini file...
[22:17:02] Write ServiceID(postgresql-8.4) to registry/ini...
[22:17:02] Write Superuser to ini file and windows registry...
[22:17:02] Write Service Account to ini file and windows registry...
[22:17:02] Write the server description to the ini file...
[22:17:02] Write the server branding to the ini file...
[22:17:02] Write the 'whether stack-builder is disabled or not' to the ini file...
[22:17:02] Finished running post-installation/upgrade tasks.
Creating Uninstaller
Creating uninstaller 25%
Creating uninstaller 50%
Creating uninstaller 75%
Creating uninstaller 100%
Installation completed
Log finished 04/03/10 at 22:17:11


Is there anything there I should be worried about or that is going to cause me future problems? I just want to get this done right, right now.

Finally, two(hopefully) last stupid questions. (1)When I started up HEM I got a fatal error saying that there was no database. Makes sense. It then asked me to name it. I can name that new database anything I like, correct? I can just call it "HEMDB" and be done with it, right? EDIT: Forget about #2. I just finally read that I have to use two DB - one for each. Which must mean I have to import hands into each separately.

Thanks again. You deserve a beer - or favorite beverage of your choice. If I had a nickel for all the moderators of other forums I just came across that did little more than tell people to use google or search forums first in some smart-ass way, I'd have a lot of nickels right now. I did try to search the forums, fyi, but I really appreciate your help.

04-04-2010, 09:43 AM
If you can connect to Postgresql and can create a database then i think everything is ok now (you can use every name you like but be careful with special characters).

I don't know who told you to create 2 databases - HEM only supports 1 database at a time so it makes no sense to create 2 databases for the beginning.

04-04-2010, 11:36 AM
OOPS! My bad. Not enough information for you in my edit. I was wondering about what to do when you have both PT3 and HEM on the same machine. That is, if I ever wanted to check something out on PT3, would I have them both looking at the same database, or would I have to make two different ones and import the hands over to PT3 when I wanted to use it. That's all.

Not sure I'll use PT3 much if at all anymore, but just wanted to know since I already own it and all.

Thanks again for all your help. I managed to get a short session in late last night and things seemed to work fine. Now I just need to figure out how to use HEM! :D

04-04-2010, 11:56 AM
PT3 and HEM each need to create their own separate databases in your PostgreSQL installation/server. They can not read each other's databases. You would need to export/import all of the hands and/or import all your original/archived hands.