PostgreSQL problems

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

PostgreSQL problems

Postby bluef0x » Sun Mar 09, 2008 12:13 am

So a couple of weeks ago I opened up PT and received a "Database Error" that said the following:

Unable to connect to the database.
101 - SQLSTATE = 08001
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?

I couldn't figure out how to fix the error, so I installed a new PostgreSQL and made a new database. All was fine for a week and now I just received the same error.

What is causing this?
bluef0x
 
Posts: 3
Joined: Fri Dec 14, 2007 12:50 am

Re: PostgreSQL problems

Postby ptrack pat » Sun Mar 09, 2008 10:26 am

It's probably related to a firewall/anti-virus/windows update.

What firewall/anti-virus software do you use?

Go to the c:\program files\postgresql\8.2\data folder. Is there a file called postmaster.pid there? If so, delete it and restart the computer and see if it connects then.

When did you backup this db last?
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: PostgreSQL problems

Postby bluef0x » Sun Mar 09, 2008 1:38 pm

[quote="ptrack pat"3do]It's probably related to a firewall/anti-virus/windows update.

What firewall/anti-virus software do you use?

Go to the c:\program files\postgresql\8.2\data folder. Is there a file called postmaster.pid there? If so, delete it and restart the computer and see if it connects then.

When did you backup this db last?[/quote3do]

I didn't backup the DB since it's only been a week and I don't mind losing it.... but I've never changed anything on my computer both times Postgres decided to fail. I don't use any Anti-Virus software or firewall. I have a router, is there any setting I should change? Note: I haven't changed anything on the router and before I had this Windows Vista PC my DB was huuuuuuuuge and spanned a year without any problems.

There's a postmaster.opts, but no postmaster.pid.
bluef0x
 
Posts: 3
Joined: Fri Dec 14, 2007 12:50 am

Re: PostgreSQL problems

Postby ptrack pat » Sun Mar 09, 2008 3:20 pm

Go to the Start > Settings > Control Panel > Admin Tools > Services window and find PostgreSQL 8.2 in the list. Try to start it. Does it give an error?

If it does, go to the c:\program files\postgresql\8.2\data\pg_log folder and there should be a file with todays date on it. Open that file and copy/paste the text of the log file into a reply.
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm

Re: PostgreSQL problems

Postby bluef0x » Sun Mar 09, 2008 9:13 pm

2008-03-09 09:55:31 LOG: database system was shut down at 2008-02-13 09:51:33

2008-03-09 09:55:31 LOG: record with zero length at 9/22066D08

2008-03-09 09:55:31 LOG: invalid primary checkpoint record

2008-03-09 09:55:31 LOG: record with zero length at 9/22066CB8

2008-03-09 09:55:31 LOG: invalid secondary checkpoint record

2008-03-09 09:55:31 PANIC: could not locate a valid checkpoint record




This application has requested the Runtime to terminate it in an unusual way.

Please contact the application's support team for more information.


2008-03-09 09:55:31 LOG: startup process (PID 2148) exited with exit code 3

2008-03-09 09:55:31 LOG: aborting startup due to startup process failure

2008-03-09 09:55:32 LOG: logger shutting down
bluef0x
 
Posts: 3
Joined: Fri Dec 14, 2007 12:50 am

Re: PostgreSQL problems

Postby ptrack pat » Sun Mar 09, 2008 10:15 pm

That really doesn't tell me what I was hoping for.

These kinds of things are very difficult to figure out what happened.

ZIP the entire c:\program files\postgresql\8.2\data folder so you have a backup of all the data files.

Use the Start > Settings > Control Panel > Add or Remove Programs window to uninstall PostgreSQL. Uninstalling will still leave the entire c:\program files\postgresql\8.2\data folder intact.

Go to the Start menu and select Run. Type COMMAND on this window to open a DOS window. Type:

net user postgres /delete

into the DOS window and hit ENTER to run it. Type EXIT to close the DOS window.

Download and reinstall PostgreSQL as detailed here:
http://www.pokertracker3.com/products/P ... nstallSQL2

EXCEPT FOR WHEN YOU GET TO THE WINDOW that has "Initialize database cluster" at the top. UNCHECK THAT BOX and then click the Next button. This will cause it to try to reuse the old ../data folder which has your databases in it.

Once installation completes, restart the computer and try it again.
ptrack pat
 
Posts: 4841
Joined: Sun Dec 09, 2007 12:38 pm


Return to PostgreSQL Forum

Who is online

Users browsing this forum: No registered users and 23 guests

cron