PDA

View Full Version : Moved Postgre data now cannot connect



Pilch
11-15-2011, 07:01 PM
My SSD is full so I'm moving my Postgre database over to a new one. I followed the guidelines here

http://faq.holdemmanager.com/questions/368/Move+Database+to+Another+Hard+Drive+or+Partition

but then when restarting HEM, I got the 127.0.0.1 error unable to connect. I tried moving all my data back to the original location and amending the registry as described but still no connection.

How do I go about either moving it successfully or restoring it to its original location?

Patvs
11-15-2011, 10:35 PM
Move the folder.
Besides editing the registry, try reinstalling PostgreSQL to the new location with the installer from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)
(if you used 8.4.x before--> you have to install 8.4.x again)

During the installation select the old /PostgreSQL/8.4/data folder.
http://faq.holdemmanager.com/questions/70/ReinstallPostgreSQL

Pilch
11-16-2011, 06:49 AM
Folder moved. Postgre uninstalled from Control Panel. When I go to reinstall Postgre again, I get the following

35301

If I continue, I then get this message

35311

I tried entering postgrespass, dbpass (as I also have a copy of PT3) and also leaving it blank but it says the password is incorrect each time.

netsrak
11-17-2011, 06:59 AM
Did you try postgres as password?

You can look in the config\holdemmanager.config file - you should see the password HM used in the first lines.

Pilch
11-17-2011, 02:24 PM
Thanks, strangely postgres worked as the password, even though the config file says postgrespass. Anyway, Postgre reinstalled but it didn't give me the option to install to a new location, it wanted to just 'repair' the one on the original drive even though I had uninstalled it.

Once reinstalled, I tried to point it to the data contained on the new drive (via the registry) but when starting HEM, it says my database does not exist. Any clues?

netsrak
11-18-2011, 06:36 AM
I suggest you uninstall Postgresql, delete all the data folders, reinstall Postgresql on the new partition and restore the database backup

Pilch
11-18-2011, 07:56 AM
Do you mean import the database backup from Holdem Manager\Backups? If so, this file was last modified over a year ago, so I presume it's not up to date.

Also, when I uninstalled Postgres and moved the data to a new drive last time, when reinstalling, it still seemed to think there was an installation on the main C drive and chose to repair / update this rather than do a clean install.

I have almost no idea about using the registry but when following the guidelines here

http://faq.holdemmanager.com/questions/368/Move+Database+to+Another+Hard+Drive+or+Partition

after I had uninstalled, there was still something in the registry for Postgre.

Patvs
11-19-2011, 12:43 AM
Uninstall it with Revo Free: Download Revo Uninstaller Freeware - Free and Full Download - Uninstall software, remove programs, solve uninstall problems (http://www.revouninstaller.com/start_freeware_download.html)
which should delete all registry keys.
(so next time you install it, you will have the option to choose a new location)

Pilch
11-19-2011, 10:01 AM
Thanks for the link. I managed to completely uninstall Postgre, reinstall to the new location where the data is, point it to the data during the installation but now I'm back to the 'Failed to establish a connection to '127.0.0.1'' notification when I start HEM.

My HEM config file has postgres and postgres as Login and password, which I have on the Postgre database control panel that pops up.

What should I do now?

Patvs
11-19-2011, 04:16 PM
Turn on the secondary Logon. The secondary logon service is a standard windows service which is available on every windows computer. In the latest versions it is not started automatically. You need to start it via control panel > administrative tools > services. Starting it once should insure it works in the future also.

Try a different version of PostgreSQL and install it to a different port number.
For example: 8.2: PostgreSQL: Choose a Mirror (http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v8.2.21/win32/postgresql-8.2.21-1.zip) to port 5433 and connect to that instead.

Pilch
11-20-2011, 06:58 AM
Secondary log on didn't have an effect I'm afraid.

I installed 8.2 and was able to set it up using a different port. When I start HEM it then gives me the option to create a new database. If I close HEM, copy the existing Postgre data folder over, it says 'A connnection to PostgreSQL could not be made'. Is this because 8.4 data is not compatible with 8.2 data?

If I go back to the beginning after the 8.2 installation and set up a new HEM database, is there any way of getting my old database usable again? As mentioned, my HEM backup file is months out of date according to its last modified date.

Patvs
11-20-2011, 10:51 PM
8.2 is not compatible with 8.4
So ideally, use the new 8.2 database, and reimport all your hands into the new database (by running a import from folder on your archive folder, C:/HMArchive)



The only way to connect to the old 8.4 database, would be:
-move the old /data folder to a different location like, C:/PostgreSQL/8.4/data in a non-system folder (so NOT in a subfolder, of C:/Program Files
-Reinstall PostgreSQL to that location with the manual installer from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)
-Try using a different port (so not 5432) but for example 5434.