Hard Drive Failure

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Hard Drive Failure

Postby pr1mo » Mon Feb 16, 2009 2:30 am

My hard drive started failing and it crashed everytime i tried to export out my hands so i saved the data dir and put in a new hard drive and put the data dir onto the new hard drive but i can't seem to get it to connect back up to pt. i don't want to re-import all of my hands because it's a huuge db that will take me a couple weeks. i tried newer postgres version 8.3.6 and older version 8.3.5 which was used to make the db but both aren't working with this re-connect FAQ. Is there any other way to try to get pt back connected to this postgres data folder db?

I have a copy of my postgres folder from before a harddisk failure or before I uninstalled postgres - how do I reconnect to my databases?
1.) Save your "data" folder. You can find it in C:\Program Files\PostgreSQL\8.3.
2.) Uninstall postgresql completely and delete everything under C:\Program Files\PostgreSQL\8.3. EXCEPT the data folder.
3.) Install PostgreSQL again, but untick "Initialize Database cluster".
4.) click on "connect" again and it should work
pr1mo
 
Posts: 192
Joined: Tue Apr 29, 2008 10:22 pm

Re: Hard Drive Failure

Postby WhiteRider » Mon Feb 16, 2009 5:23 am

Exactly what went wrong when you tried to do this?

See this guide too: How to reinstall Postgres - this might give you more clues.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hard Drive Failure

Postby pr1mo » Mon Feb 16, 2009 5:48 am

i did everything according to the reinstall postgres from that link. what is wrong is that when i do this setup postgres doesn't start. when i go into administrative tools, event viewer, application, i can see in there that it is saying "database cluster was initialized with HAVE_INT64_TIMESTAMP but the server was compiled without HAVE_INT64_TIMESTAMP, %t HINT: It looks like you need to recompile or initdb."

so it looks like there is a problem with the initial database cluster step.

also there is this error:

"The description for Event ID ( 0 ) in Source ( PostgreSQL ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE = flag to retrieve this description: see Help and Support for details. The following information is part of the event: %t FATAL: database files are incompatible with server."
pr1mo
 
Posts: 192
Joined: Tue Apr 29, 2008 10:22 pm

Re: Hard Drive Failure

Postby WhiteRider » Mon Feb 16, 2009 6:13 am

I'll get one of our postgres experts to take a look at this thread..
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hard Drive Failure

Postby APerfect10 » Mon Feb 16, 2009 10:37 am

How did you install PostgreSQL on your old system? Where did you obtain the installation files from?

PostgreSQL does not yet officially support Windows 64bit computing and it appears that you previously installed a 64 bit version which means it must have not been from an official "PostgreSQL" distribution.

Unfortunately, we only support official PostgreSQL distributions therefore I am not familiar with any x64 compiled versions. You will need to reinstall PostgreSQL via whatever method you initially downloaded/installed.

Best regards,

Derek
APerfect10
Site Admin
 
Posts: 4489
Joined: Sat Dec 08, 2007 6:03 pm

Re: Hard Drive Failure

Postby pr1mo » Mon Feb 16, 2009 4:42 pm

i have always installed from the postgres site. i am 99% sure that the version i installed was 8.3.5-2 and i installed it with the one-click windows installer. but when i try to reinstall postgres with this same file it doesn't give me an option to 'not' initialize database cluster...it just quickly installs it all. so i tried to download the .zip file from postgres website and install from the .msi file but it still didn't work and then i tried to install with a downloaded msi version of 8.3.5 thinking that it might be because i need to install postgres version i was using but this still didn't work...my windows is 32bit.
pr1mo
 
Posts: 192
Joined: Tue Apr 29, 2008 10:22 pm

Re: Hard Drive Failure

Postby APerfect10 » Tue Feb 17, 2009 12:42 am

OK, that explains it. The "one click installer" is fairly new and is compiled/provided by EnterpriseDB. I have never used it nor do I recommend using it. We always use the pgInstaller which is what is packaged within PT3 and is fail proof...

You will not need to reinitialize the database cluster. It is already initialized and is available in the data directory that you copied over so you would skip this step. The problem is that you originally initialized the database cluster during your previous installation using x64; however, your new install is x86 (32 bit). Does the one click installer not provide the option to choose whether you want to install 64 of 32 bit?

Best regards,

Derek
APerfect10
Site Admin
 
Posts: 4489
Joined: Sat Dec 08, 2007 6:03 pm

Re: Hard Drive Failure

Postby pr1mo » Tue Feb 17, 2009 2:37 am

the one click installer does not provide an option to select either 32bit or 64bit. i installed one-click installer 8.3.5-2.exe and built the database. hard drive crashed, i backed up data directory which is 357gb which is all one ptdb. i tried to install new postgres 8.3.6-2.exe one click installer, didn't have option to reinitialize db cluster, didn't connect to data dir. i then tried original file of 8.3.5-2.exe of one click installer and didnt have option to reinitialize db cluuster, didn't connect to data dir. i then tried new 8.3.6-2.zip file which had .msi file in it and i didn't do initialize db cluster and still didn't connect to data dir. i then found an old 8.3.5-2.zip file which had .msi file in it and i didn't do initialize db cluster and still didn't connect to data dir. then i came here to post this. so this is everything that i've tried. each time i've tried this postgres wont even start on my machine. i can't even get processes running. when i try to go to start-run-services.msc and manually start it i get the errors i typed below from control panel-administrative tools-event viewer-application.

thanks derek for your continued help, i really wanna get this db re-connected because a couple weeks of re-importing is not fun and i've had to do it a few times before.
pr1mo
 
Posts: 192
Joined: Tue Apr 29, 2008 10:22 pm

Re: Hard Drive Failure

Postby pr1mo » Tue Feb 17, 2009 8:31 pm

i should also say that i still have the hard drive that crashed altho i unplugged it out of the computer. and it will boot up and stuff and i can still access and move files around and check things but it just crash's every once inawhile and i'm not sure why.
pr1mo
 
Posts: 192
Joined: Tue Apr 29, 2008 10:22 pm


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 3 guests