reindex db failed?

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

reindex db failed?

Postby llamataboot » Thu Nov 20, 2008 1:34 am

While I'm waiting for support to get back to me, I have been trying to figure out what might be the problem on my own. I figured I could at least reindex the database and see if that helps. However, the reindexing process fails:

I get the error:
reindexing of database "PT3 DB" failed. Error: could not create unique index "holdem_hand_player_statistics_primary_key"
DETAIL: Table contains duplicate values

--

anyone know how to fix this?
llamataboot
 
Posts: 8
Joined: Mon Nov 10, 2008 11:41 pm

Re: reindex db failed?

Postby WhiteRider » Thu Nov 20, 2008 5:22 am

Is this using “reindexdb -a” from the Database / Postgres FAQ?

I don't know enough about postgres to know what that implies, but it doesn't sound good.
I'll get someone who knows more about postgres to have a look at this thread.

What is your ticket number, so that we can link the issues?
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: reindex db failed?

Postby kraada » Thu Nov 20, 2008 9:44 am

That sounds like your database is likely corrupted and the quickest and easiest fix is going to be to export your hands from your old DB and reimport them into a new DB.

You can export hands via Database --> Database Management, clicking on your database and clicking "export". Then click "New" and reimport those hands into a new database using the Import From Directory button on the manual import tab. Let the system cluster, vacuum, analyze and update the cache when you finish and you should be all set at that point in this regard at least.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: reindex db failed?

Postby llamataboot » Thu Nov 20, 2008 11:27 am

Kraada,

Unfortunately I can't do that because PT can't connect to the database, I can only connect to it through PGAdmin III.

I suppose I could get the same results by copying the processed folder somewhere, starting a new database, and importing the processed folder? All the files in my database have been processed by this version of PT, I didn't import any hands from PT2.
llamataboot
 
Posts: 8
Joined: Mon Nov 10, 2008 11:41 pm

Re: reindex db failed?

Postby WhiteRider » Thu Nov 20, 2008 12:39 pm

Yes, just create a new database and import from the processed folder - you don't need to move it anywhere, just use Manual Import to import from the directory.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: reindex db failed?

Postby llamataboot » Fri Nov 21, 2008 8:15 pm

Hmm, a new database does indeed work, but importing from the processed directory only gives me about 10% of my old hands. Any way to just export the "correct" and readable lines from the old db?
llamataboot
 
Posts: 8
Joined: Mon Nov 10, 2008 11:41 pm

Re: reindex db failed?

Postby WhiteRider » Sat Nov 22, 2008 5:07 am

I'm not sure - I think it should be possible but I don't know how. I'll try to find out.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 26 guests

cron