PDA

View Full Version : Reinstall Postgresql With Old Database...Too Late?



cyberrico
12-16-2009, 02:30 PM
I was forced to reinstall Postgresql when I got a connection error and didn't know that it wouldn't automatically use my old database. I saw these instructions (http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177) after I did the reinstall.

I spent weeks getting my massive amount of data imported. Am I going to have to re-import or can I still follow the instructions above?

Patvs
12-16-2009, 04:17 PM
If you reinstall the same version of PostgreSQL (so 8.3--> 8.3) or 8.4--> 8.4..
Use the same port number... (default: 5432), use the same main user name (default: postgres) and reinstall it to the same directory as the old installation,
you should be able to use your old database again.

Just open Database Management (or dbcontrolpanel.exe) and set your old database as the "default database".

cyberrico
12-19-2009, 04:46 PM
The database control panel doesn't give me the option to select any other databases. The default and only database it shows is "holdemmanager".

I ran pgAdminIII and it shows two databases, holdemmanager and postgres. I'm hoping that postgres is my old database but I have no idea how to make it my default to find out.

Any ideas?

Patvs
12-19-2009, 06:22 PM
Postgres is just the server name,.. not your old database.
Check in the ProgramFiles/PostgreSQL folder, if there is a 8.3 and a 8.4 subfolder.

If not, you've lost your old database. Just reimport all your old hands into a new database.

cyberrico
12-28-2009, 02:45 AM
Postgres is just the server name,.. not your old database.
Check in the ProgramFiles/PostgreSQL folder, if there is a 8.3 and a 8.4 subfolder.

If not, you've lost your old database. Just reimport all your old hands into a new database.

Sorry for the delayed response. Holidays and such.

The installer I have for Postgresql is automated. I have no control over where it installs. When I do a reinstall it renames my old 8.4 folder and creates a new one. If I do that and simply rename my old folder with the big database, I continue to get the "Failed to establish a connection to 127.0.0.1" error.

I opened the pginstaller.exe with 7zip, extracted the files there and ran the installer there. That allowed me to select my directory instead of renaming it. Installing into the old 8.4 gives me the same error. I also tried a clean install and copying the "data" folder from the old 8.4 folder to the new one. Same problem.

Patvs
12-28-2009, 03:23 AM
You can't just copy the data folder to the new one. That won't work.
Ideally: you'd install the same version of SQL in the same folder--> then running Database Management (dbcontrolpanel.exe) it will just find your old database (and you can set it to be the default database--> connect)

But if that doesn't work. Instead of the extreme hassle (constantly reinstalling SQL), I would just create a new database and reimport all my hands. (even if the reimport would take many, many hours)