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

Home » FUDforum Development » Bug Reports » Duplicate key violates unique constraint ...
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Duplicate key violates unique constraint ... [message #19322] Fri, 09 July 2004 19:36 Go to next message
Sebastian_T is currently offline  Sebastian_T   Poland
Messages: 33
Registered: January 2004
Location: Warsaw, Poland
Karma: 0
Member
Hello, World Smile


some of our users report us such an error:

Warning: pg_query(): Query failed: ERROR: duplicate key violates unique constraint "fud23_thread_view_i_fps" . in /usr/local/apache/htdocs/forum.blizniaki.net/index.php on line 141

Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /usr/local/apache/htdocs/forum.blizniaki.net/index.php on line 47


For me it was unable to recreate it. And as our "guru" (technical admin) is for some days out, we can't check logs etc.
What it can be? It shows, when replying in one of subforums...

FUD 2.6.4 stable, on PostgreSQL.

Best wishes,


Sebastian
Re: Duplicate key violates unique constraint ... [message #19323 is a reply to message #19322] Fri, 09 July 2004 19:44 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
Check the forum's sql error log with error log viewer.

FUDforum Core Developer
Odp: Re: Duplicate key violates unique constraint ... [message #19327 is a reply to message #19323] Sat, 10 July 2004 07:38 Go to previous messageGo to next message
Sebastian_T is currently offline  Sebastian_T   Poland
Messages: 33
Registered: January 2004
Location: Warsaw, Poland
Karma: 0
Member
it started on Monday (unfortunately, on Monday our "guru" went for some days... Wink ), and it continues - last error is from Friday...


Mon Jul 5 17:21:48 GMT 2004 (/usr/local/apache/htdocs/forum.blizniaki.net/index.php:141
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/post.php:2822
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/post.php:1662
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/post.php:3909
/usr/local/apache/htdocs/forum.blizniaki.net/index.php:1183
) : ERROR: duplicate key violates unique constraint "fud23_thread_view_i_fps"
Query: INSERT INTO fud23_thread_view (thread_id,forum_id,page,pos) SELECT thread_id,forum_id,CEIL(pos/40.0),(pos-(CEIL(pos/40.0)-1)*40) FROM fud23_ftvt_1350593311
Server Version:
[Referring Page] http://forum.blizniaki.net/index.php?t=post

[...]

Fri Jul 9 22:41:15 GMT 2004 (/usr/local/apache/htdocs/forum.blizniaki.net/index.php:141
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/post.php:2822
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/post.php:1662
/usr/local/apache/htdocs/forum.blizniaki.net/theme/default/post.php:3909
/usr/local/apache/htdocs/forum.blizniaki.net/index.php:1183
) : ERROR: duplicate key violates unique constraint "fud23_thread_view_i_fps"
Query: INSERT INTO fud23_thread_view (thread_id,forum_id,page,pos) SELECT thread_id,forum_id,CEIL(pos/40.0),(pos-(CEIL(pos/40.0)-1)*40) FROM fud23_ftvt_2049700293
Server Version:
[Referring Page] http://forum.blizniaki.net/index.php?t=post&th_id=2348&reply_to=185 76&&start=0



Sebastian
Re: Odp: Re: Duplicate key violates unique constraint ... [message #19331 is a reply to message #19327] Sat, 10 July 2004 16:24 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
Try running the consistency checker.

FUDforum Core Developer
Odp: Re: Odp: Re: Duplicate key violates unique constraint ... [message #19340 is a reply to message #19331] Sun, 11 July 2004 18:40 Go to previous messageGo to next message
Sebastian_T is currently offline  Sebastian_T   Poland
Messages: 33
Registered: January 2004
Location: Warsaw, Poland
Karma: 0
Member
Done (result below). Nothing changed...




Disabling the forum for the duration of maintenance run
Locking the database for checking
Locked!
Validating category order
Done: Validating category order
Checking if moderator and users table match
OK
Rebuilding moderators
Done: Rebuilding moderators
Checking if all private messages have users
OK
Checking messages against users & threads
2 entries unmatched, deleted
Checking threads against forums
OK
Checking message approvals
Done: Checking message approvals
Checking threads against messages
OK
Checking thread last & first post ids
Done: Checking thread last & first post ids
Checking forum & topic relations
Done: Checking forum & topic relations
Validating Forum Order
Done: Validating Forum Order
Checking thread_exchange
OK
Checking read table against users & threads
413 entries unmatched, deleted
Checking file attachments against messages
19 entries unmatched, deleted
Rebuild attachment cache for regular messages
Done: Rebuild attachment cache for regular messages
Rebuild attachment cache for private messages
Done: Rebuild attachment cache for private messages
Checking message reports
OK
Checking polls against messages
1 entries unmatched, deleted
Checking polls options against polls
6 entries unmatched, deleted
Checking polls votes
OK
Rebuilding poll cache
Done: Rebuilding poll cache
Validating poll activation
Done: Validating poll activation
Checking smilies against disk files
OK
Checking disk files against smilies
OK
Checking topic notification
41 entries unmatched, deleted
Checking forum notification
OK
Checking topic votes against topics
OK
Rebuild topic rating cache
Done: Rebuild topic rating cache
Rebuilding Topic Views
Done: Rebuilding Topic Views
Rebuilding user ranks, message counts & last post ids
Done: Rebuilding user levels, message counts & last post ids Checking buddy list entries OK Checking ignore list entries OK Rebuilding buddy list cache
Done: Rebuilding buddy list cache
Rebuilding ignore list cache
Done: Rebuilding ignore list cache
Rebuilding ip filter cache
Done: Rebuilding ip filter cache
Rebuilding login filter cache
Done: Rebuilding login filter cache
Rebuilding email filter cache
Done: Rebuilding email filter cache
Rebuilding extension filter cache
Done: Rebuilding extension filter cache
Rebuilding custom tags for users
Done Rebuilding custom tags for users
Validating group resources
OK
Done: Validating group resources
Validating group validity
OK
OK
Done: Validating group validity
Validating group members
OK
Done: Validating group members
Validating group/forum relations
Done: Validating group/forum relations
Validating group/forum names
Done: Validating group/forum names (fixed: 0 relations) Validating group/primary user relations
Done: Validating group/primary user relations
Rebuilding group leader cache
Done: Rebuilding group leader cache
Rebuilding group cache
Done: Rebuilding group cache
Validating User/Theme Relations
Done: Validating User/Theme Relations
Rebuilding Forum/Category order cache
Done: Rebuilding Forum/Category order cache
Remove absolete entries inside sessions table
Done: Removing absolete entries inside sessions table
Unlocking database
Database unlocked
Cleaning forum's tmp directory
Done: Cleaning forum's tmp directory
Validate GLOBALS.php
Done: Validate GLOBALS.php
Re-enabling the forum.
DONE





Sebastian
Odp: Re: Odp: Re: Duplicate key violates unique constraint ... [message #19342 is a reply to message #19340] Sun, 11 July 2004 23:03 Go to previous message
Sebastian_T is currently offline  Sebastian_T   Poland
Messages: 33
Registered: January 2004
Location: Warsaw, Poland
Karma: 0
Member
ok, helped only upgrade to 2.6.4 (as in error, I wrote before, that we have 2.6.4 - we had 2.6.3)... but now it's ok Smile



Sebastian

[Updated on: Sun, 11 July 2004 23:05]

Report message to a moderator

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Lost center and right justification upgrading to 2.6.4
Next Topic: upgrade 2.6.4 rdf.php fails
Goto Forum:
  

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

Current Time: Fri Nov 22 07:21:28 GMT 2024

Total time taken to generate the page: 0.04049 seconds