reinstalled postgre and eliminated my database?

Forum with tips, support, etc, on using the PostgreSQL database with Poker Tracker. Please post any PostgreSQL questions here.

reinstalled postgre and eliminated my database?

Postby creed_of_hubris » Wed Mar 12, 2008 6:46 am

First off, I am a windows n00b, so I really don't know what I'm doing here and apologize if I sound totally clueless.

I had to move my postgresql files to a new partition. When I did that, postgre promptly turned off and I was unable to restart it, so I followed the directions at the end of this thread:

http://www.pokertracker3.com/forum/view ... =29&t=1456

zipped the /data files, and reinstalled postgre into the new partition. When I unclicked "initialize database cluster", the installer told me that there was a problem with, I think, initdb, and that postgre would not run if I did not reinitialize the cluster, so I allowed it to reinitialize. After it was done installing, I unzipped and copied the old /data files over the new ones. Now postgre runs, but the database is nowhere to be found. Is there a way to retrieve it?
creed_of_hubris
 
Posts: 5
Joined: Wed Mar 12, 2008 6:34 am

Re: reinstalled postgre and eliminated my database?

Postby ptrack pat » Wed Mar 12, 2008 9:16 am

What is the size of the ZIP file you have that contains your old data folder?
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: reinstalled postgre and eliminated my database?

Postby creed_of_hubris » Wed Mar 12, 2008 12:44 pm

[quote="ptrack pat"uj2]What is the size of the ZIP file you have that contains your old data folder?[/quoteuj2]

700 megs or so.

When unzipped, it seems to be the same size as the old data folder.
creed_of_hubris
 
Posts: 5
Joined: Wed Mar 12, 2008 6:34 am

Re: reinstalled postgre and eliminated my database?

Postby creed_of_hubris » Wed Mar 12, 2008 12:51 pm

There are two gigantic database files, one belonging to PT and one belonging to <ahem> HoldemManager. I can see them; they are numbered, and I understand that is the "OID" number.

I tried to create a new database using PGAdmin and using the folder # as the OID, but I couldn't enter OID, it was was greyed out.

I created a database with a new OID, and copied the old files into that folder, and that also didn't work.

So I'm not sure what to do next.
creed_of_hubris
 
Posts: 5
Joined: Wed Mar 12, 2008 6:34 am

Re: reinstalled postgre and eliminated my database?

Postby ptrack pat » Wed Mar 12, 2008 1:00 pm

Did you at least do a backup of your database using the PostgreSQL Database Functions window before you started doing all this?? I would hope so. If not, when was the last time you backed it up?
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: reinstalled postgre and eliminated my database?

Postby creed_of_hubris » Wed Mar 12, 2008 1:06 pm

I didn't back it up before doing this, and my last backup was months ago. There wasn't room in the partition where the database was sitting to back it up anyway, that's why I had to move it. (It's on parallels, and the only way to expand disk space is to create new partitions.)

I'm used to a Mac environment, where if you move files, it doesn't matter. Thus when I moved the database and it stopped working, I got very confused and apparently made some poor choices.
creed_of_hubris
 
Posts: 5
Joined: Wed Mar 12, 2008 6:34 am

Re: reinstalled postgre and eliminated my database?

Postby ptrack pat » Wed Mar 12, 2008 2:20 pm

Use the Start > Settings > Control Panel > Add or Remove Programs window to uninstall PostgreSQL.
Then go to the new folder where you reinstalled PostgreSQL before and delete that folder, so if you installed PostgreSQL on the "R" drive (I'll use this as an example for the rest of this post) then go to the PostgreSQL folder on the "R" drive and delete the contents of it.

Now, extract just the contents of the ../postgresql/8.2/data folder from the ZIP file into a folder on the "R" drive. So if you put it right into the main folder on the "R" drive you would have a new folder after extracting called "R:\data". If there is a file called postmaster.pid in the /data folder afterwards, delete it.

Now, reinstall PostgreSQL. When you get to the window where you tell it where to install tell it you want it to be on the "R" drive. Then click the "Data" button and point that to the "R:\data" folder.

Continue with the reinstall until you get to the window that says "Initialize Database Cluster" at the top. Uncheck this and click Next. Hopefully it won't give you any problems this time.

Once the install is done, restart your computer and then see if you can open PT. If you can't tell me the exact error you get.

If this doesn't work then I'll give you directions on how to FTP the ZIP file to me and I will try to recover your Poker Tracker database.
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: reinstalled postgre and eliminated my database?

Postby creed_of_hubris » Wed Mar 12, 2008 2:50 pm

It's giving me the same error when I try to install postgre.

"Initdb warning: The specified data directory does not contain an existing database cluster. Installling without initialising a database cluster in this case will produce an installation that will not start. Are you sure you want to continue without running initdb?"

I told it yes, and reinstalled without initialising.

Now I get the same problem I had when I moved the database in the first place: no access at all to postgre.

The error message from pokertracker is

database error
101 - SQLSTATE = 08001
could not connect to server: Connection refused (0x0000274D/10061)


The error message I get from pgAdmin is

Server Doesn't Listen


Looks like I'm going to need to send you the files :-(
creed_of_hubris
 
Posts: 5
Joined: Wed Mar 12, 2008 6:34 am

Re: reinstalled postgre and eliminated my database?

Postby ptrack pat » Wed Mar 12, 2008 3:23 pm

I will PM you with directions on how to FTP the file.
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: reinstalled postgre and eliminated my database?

Postby HungryQueens » Sun Sep 27, 2009 8:26 am

Greetings, I am trying to reinstal PostgreSQL in Vista.

I used the Uninstall/Reinstall manual which you provided. Because there allready is a database, I unchecked the "initailize database cluster"-option. Doing that, I get the same error message as expressed above;

"The specified data directory does not contain an excisting database cluster. Installing without initializing a database cluster in this case will produce an installation that will not start. Are you sure you want to continue without running initdb?"

What do I do to solve this problem?
HungryQueens
 
Posts: 3
Joined: Fri Oct 17, 2008 7:00 pm

Next

Return to PostgreSQL Forum

Who is online

Users browsing this forum: No registered users and 0 guests