disclaimer: This is a rough guide about installing initdb manually for those having problems with the Postgres installer. I really wouldn't recommend following the advice in this post unless you've tried EVERYTHING else. I'm not a computer professional and I can't guarantee this will work for you so try this very carefully and at your own risk. This guide gets messy, and I'm recalling from memory so it might have some inaccuracies here and there... Obviously I'm not responsible if you break your computer.
I have Win XP and was running into the "failed to run initdb:1" error, despite having my admin/privileges setup supposedly correct. After trying nearly everything and having no luck finding a process that was blocking the install, I decided to find a way to run initdb manually and get around the installer's "failed to run initdb:1" error. Here's what I did:
The easy part
fresh complete uninstall/re-install PT3 w/ PostgreSQL
Run PostgreSQL installer
UNCHECK the box that prompts you to install the database as a service (this will install the program and service but won't run initdb in the install)
continue with the install of postgreSQL
Running initdb manually
start->run-> cmd
in the command prompt type: cd "c:\program files\postgresql\8.3\bin" (include the quotations)
the directory should be changed now, type in: initdb -W -A md5 -D c:/data
(roughly this means you're going to make the postgre user and create the "data" folder in c:\ instead of the usual postgresql install path.)
If your problem is the same as mine you'll have to bypass passwords later, but remember it just in case.
there should now be a folder called "data" in C:\, you should verify it's there.
drag and drop the "data" folder that you created into C:\program files\postgresql\8.3\
Restart your computer
start->all programs->postgresql->start database
open up pokertracker 3
type in the password...it probably won't work yet and come up with more errors.
Unable to connect to this database errors
Now you're probably getting an "unable to connect to this database" error. If this is the case, you need to look at what the database log says:
If it says ident authentication failed for user "postgres", you have to remove password requirements:
To remove password requirements go to start -> postgresql -> configuration files -> pg_hba.cfg and scroll to the bottom of this file. In the two places you see md5, replace them w/the word trust, then save the file. Local queries to the database will no longer be password validated.
Now try it. That solves it for most people, but you might a "role "postgres" does not exist" error next, as I did. The solution for this is to create the postgres user:
start -> postgresql -> command prompt
type in "createuser postgres"
Now the password requirement is overridden and the postgres user exists.
OK hopefully now it's ready to go. I actually hope no one needs to use this guide, use it as a last resort. The main problem is that you'll have to run the database every time you want to use PT. If anyone knows a workaround to that, please let me know.
Oh and thanks to keggler who was very kind to wade through emails and procmon logs trying to help me out.