FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Reimport Causing Indexing Problems
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Reimport Causing Indexing Problems [message #12289] Sun, 03 August 2003 00:19 Go to next message
master of substance is currently offline  master of substance   United States
Messages: 6
Registered: August 2003
Karma: 0
Junior Member
An upgrade from 2.3.8 to 2.5.2 bombed. (I'll post that error after things are back to working order.) So I uninstalled everything and deleted files and reinstalled 2.3.8 and then imported the datadump taken from just prior to maintenance work.

I see everything from the datadump, but when I start to post a new message I get a SQL error. pg_query(): Query failed: ERROR: Cannot insert a duplicate key into unique index fud23_msg_pkey

I'm using PostgreSQL 7.3.3 I have reindexed the table fud23_msg. I have dropped the constraint on fud23_msg_pkey and recreated the index, but the php code continues to want to reuse one of the message id's.

Any suggestions?

Re: Reimport Causing Indexing Problems [message #12291 is a reply to message #12289] Sun, 03 August 2003 01:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The old data import has a bug when dealing with PosgreSQL it does not set the new id for the primary key. Fortunately this problem is easily solved.
For all the forum tables that have an 'id' field do the following:
SELECT MAX(id) FROM TABLE_NAME;
SELECT setval('TABLE_NAME_seq_id', MAX_ID);


FUDforum Core Developer
Re: Reimport Causing Indexing Problems [message #12299 is a reply to message #12291] Sun, 03 August 2003 02:12 Go to previous messageGo to next message
master of substance is currently offline  master of substance   United States
Messages: 6
Registered: August 2003
Karma: 0
Junior Member
Thanks. A little time consuming, but it worked beautifully. I figured out that it was related to the sequence, but couldn't figure out how to update the values in the sequesnces.

Thank you.
Re: Reimport Causing Indexing Problems [message #12301 is a reply to message #12299] Sun, 03 August 2003 16:16 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I am glad that you were able to correct the problem, could you please tell me the nature of the problems you've experienced when you tried to upgrade from 2.3.8 to 2.5.2?

FUDforum Core Developer
Re: Reimport Causing Indexing Problems [message #12381 is a reply to message #12289] Wed, 06 August 2003 17:57 Go to previous messageGo to next message
master of substance is currently offline  master of substance   United States
Messages: 6
Registered: August 2003
Karma: 0
Junior Member
It looks like you've covered them here.

So have the 2.5.2 upgrade files on the download page been updated with these fixes?
Re: Reimport Causing Indexing Problems [message #12382 is a reply to message #12381] Wed, 06 August 2003 18:09 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
NO the fixes posted at that URl will be part of 2.5.3

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Confusion over inheritance and permissions
Next Topic: add forums / groups to FUDForum directly through MySQL
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 07 18:51:53 GMT 2024

Total time taken to generate the page: 0.03001 seconds