PDA

View Full Version : Postgres Connection Problems



DONNYBOY
04-01-2010, 01:19 PM
I know there's been lots of people with similar problems on here, and I'm sorry to be going over the same stuff again. I've searched through the other posts, and there's so many suggestions that are supposed to fix the problem, and I have no idea which one I should try.

I have my holdemmanager on two different computers, one which runs on XP and the other on Vista. My database is on a separate hard drive which I move between the two, depending on which computer I'm using.

The problem is happening on both computers, so it's not down to a firewall, or settings problem. It started happening suddenly only this weekend, so maybe something is corrupted? I'm not sure.

Anyway, I plug in the hard drive but can't load up HM as it says it cannot connect. Then when I try to start the postgres service, I am informed that it was started, and then stopped again.

I was recently having problems importing large files into the database, but after breaking these large files into smaller ones, the problem fixed. Then this other one started.

My database is quite big, and I don't really want to be doing a clean install and having to import all those files all over again.

Any help will be much appreciated, thanks in advance.

morny
04-01-2010, 04:02 PM
This is usually a firewall or windows update issue that causes this so try and steps that are relevant or that you havent already tried below

First try to reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the \postgresql\8.x\data\postmaster.pid file, if you see it.

Add exceptions to the windows firewall, even if it is off. If you have a 3rd party firewall, do the equivalent or uninstall it temporarily - FAQ - Hold'em Manager Poker Tracking Software :: Windows Firewall / Defender Problems (http://faq.holdemmanager.com/questions/275/Windows+Firewall+%7B47%7D+Defender+Problems) - Windows Firewall / Defender Problems

Please try following these FAQs, step by step:

1) FAQ - Hold'em Manager Poker Tracking Software :: Can't Connect / Failed to Start PostgreSQL (http://faq.holdemmanager.com/questions/91/Can't+Connect+%7B47%7D+Failed+to+Start+PostgreSQL+ ) Can't Connect / Failed to Start PostgreSQL
2) reinstall the same version of postgresql, using the same \data folder - FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+DatabaseReinst all) PostgreSQL Preserving Old Database
3) Still Can't Connect to PosgreSQL? Try This! - Holdem Manager Forums (http://www.holdemmanager.net/forum/showthread.php?t=8261)

If that doesn't help you will probably have to reinstall PostgreSQL completely and reimport your hands using these instructions

1) Uninstall PostgreSQL from the Windows Control Panel.
2) Use our combo installer to reinstall PostgreSQL. Make sure you un-check Holdem Manager during installation. http://www.holdemmanager.com/downloads/Holdem_Manager_Setup.exe

If that installer fails to install PostgreSQL, please reinstall PostgreSQL using the following instructions:
A) Start > Programs > Accessories > Command Prompt > Right-Click > Run As Administrator

net user postgres /delete
B) Reboot.
C) Try installing this version of PostgreSQL - http://www.holdemmanager.com/downloads/Postgres_8.3.9-v1.0.7.exe

DONNYBOY
04-01-2010, 05:23 PM
Ok.
My postgres will be installed on my external drive, right?
I tried to delete the postmaster.id file there and it comes up with this message:

"Cannot delete postmaster. The file or directory is corrupt and unreadable"

DONNYBOY
04-01-2010, 05:24 PM
Does this mean I will have to reinstall it?
If so, and I follow the FAQ, is it exactly the same process if I'm going to share the DB with two computers?

morny
04-01-2010, 05:37 PM
Cannot delete postmaster. The file or directory is corrupt and unreadable

Thats quite a strange message, ive never heard not being able to delete a file because its corrupt, might be a problem with the hard drive, can you try creating a text file and then try and delete it just to see if its a postmaster.pid file or hard drive issue, might be worth running a hard drive test (google, theres a couple of programs that do this for free)

DONNYBOY
04-01-2010, 06:31 PM
Hmmm. Trust mine to be the problem no one knows how to fix! Grr

I am able to save and delete text files on the drive no problem.

If I'm reinstalling a program, do I follow your FAQ exactly, even though I'm sharing the database between two computers?

_Loki_
04-01-2010, 07:11 PM
Morny is right

I think your HDD isn't healthy. That message is almost certainly a corrupted cluster. I had this myself & I fixed it with the chkdsk utility in Windows. You will probably lose a small amount of data.

I would sort out your external drive first thing with chkdsk you may have other problems on the drive & haven't noticed yet

DONNYBOY
04-03-2010, 02:11 PM
This is usually a firewall or windows update issue that causes this so try and steps that are relevant or that you havent already tried below

First try to reboot.

If no help, try this:

Start > Programs > PostgreSQL > 8.x > Stop Service

Start > Programs > PostgreSQL > 8.x > Start Service

If that doesnt help delete the \postgresql\8.x\data\postmaster.pid file, if you see it.

Add exceptions to the windows firewall, even if it is off. If you have a 3rd party firewall, do the equivalent or uninstall it temporarily - FAQ - Hold'em Manager Poker Tracking Software :: Windows Firewall / Defender Problems (http://faq.holdemmanager.com/questions/275/Windows+Firewall+%7B47%7D+Defender+Problems) - Windows Firewall / Defender Problems

Please try following these FAQs, step by step:

1) FAQ - Hold'em Manager Poker Tracking Software :: Can't Connect / Failed to Start PostgreSQL (http://faq.holdemmanager.com/questions/91/Can't+Connect+%7B47%7D+Failed+to+Start+PostgreSQL+ ) Can't Connect / Failed to Start PostgreSQL
2) reinstall the same version of postgresql, using the same \data folder - FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+DatabaseReinst all) PostgreSQL Preserving Old Database
3) Still Can't Connect to PosgreSQL? Try This! - Holdem Manager Forums (http://www.holdemmanager.net/forum/showthread.php?t=8261)

If that doesn't help you will probably have to reinstall PostgreSQL completely and reimport your hands using these instructions

1) Uninstall PostgreSQL from the Windows Control Panel.
2) Use our combo installer to reinstall PostgreSQL. Make sure you un-check Holdem Manager during installation. http://www.holdemmanager.com/downloads/Holdem_Manager_Setup.exe

If that installer fails to install PostgreSQL, please reinstall PostgreSQL using the following instructions:
A) Start > Programs > Accessories > Command Prompt > Right-Click > Run As Administrator

net user postgres /delete
B) Reboot.
C) Try installing this version of PostgreSQL - http://www.holdemmanager.com/downloads/Postgres_8.3.9-v1.0.7.exe

Thanks everyone for the help.

I checked the hard drive using chkdsk, as well as some online testing tools, and it all seems to be fine. Or is fixed now anyway, if there was anything wrong with it.

I had to use steps A, B, C to delete and reinstall postgres. Decided it would be a lot easier - though more time consuming - to just start the database afresh and reimport all my hands.

This has been fine on my desktop - holdemmanager is connecting anyway, and loading up - but now I'm trying to do the same on my laptop it still won't connect. I think I got a little confused with the installation process somewhere - I downloaded postgres onto my external hard drive, is that right??

Can you please provide a link to the FAQ walkthroughs for: a) installing postgres; b) sharing a database between two computers through one external drive?

Thank you.

P.S. Oh, and the links on this page: http://forums.holdemmanager.com/manager-general/8261-still-cant-connect-posgresql-try.html (the ones for FAQ 171 in step3, and FAQ 176 in step5) seem to go to exactly the same place... And from there I'm not sure I'm finding the right walkthroughs that I was meant to be finding...

morny
04-03-2010, 07:14 PM
This should cover A and B FAQ - Hold'em Manager Poker Tracking Software :: How do I setup Holdem Manager to share one database between two computers? (http://faq.holdemmanager.com/questions/336/How+do+I+setup+Holdem+Manager+to+share+one+databas e+between+two+computers%3F)