Bug 339850 - postgres backend: "ERROR: duplicate key value violates unique constraint "mimetypetable_name_key"
Summary: postgres backend: "ERROR: duplicate key value violates unique constraint "mi...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: 1.13.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-10 17:48 UTC by zmeyski@gmail.com
Modified: 2017-01-07 21:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
full log extracted from .xsession-errors (30.07 KB, text/x-log)
2014-10-10 17:50 UTC, zmeyski@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zmeyski@gmail.com 2014-10-10 17:48:16 UTC
Hi,

setting up new computer with akonadi 1.13.0, kde 4.14.1, qt 4.8.6, postgresql 9.3.5 running as external server. 
I stoped akonadi server and changed the config to use the external postgresql server. I got the following error in akonadiserver.error:
DATABASE ERROR: 
  Error code: -1 
  DB error:  "ERROR:  duplicate key value violates unique constraint "mimetypetable_name_key"
DETAIL:  Key (name)=(application/x-vnd.akonadi.calendar.todo) already exists.
(23505)" 
  Error text: "ERROR:  duplicate key value violates unique constraint "mimetypetable_name_key"
DETAIL:  Key (name)=(application/x-vnd.akonadi.calendar.todo) already exists.
(23505) QPSQL: Unable to create query" 
  Query: "INSERT INTO MimeTypeTable (name) VALUES (:0) RETURNING id" 

akonadi=# select * from mimetypetable;
 id |                    name                    
----+--------------------------------------------
  1 | application/x-vnd.akonadi.calendar.journal
  2 | application/x-vnd.akonadi.calendar.todo
  4 | application/x-vnd.akonadi.calendar.event
  5 | inode/directory
  6 | text/x-vnd.akonadi.note
  7 | message/rfc822
(6 rows)

Reproducible: Always

Steps to Reproduce:
1. Setup external postgresql server.
2. Stop akonadiserver
3. Change the config to use the external postgresql server and start akonadiserver

Actual Results:  
Error message about duplicate key value in akonadiserver.error log file

Expected Results:  
No errors in akonadiserver.error log file
Comment 1 zmeyski@gmail.com 2014-10-10 17:50:27 UTC
Created attachment 89082 [details]
full log extracted from .xsession-errors
Comment 2 Denis Kurz 2016-09-24 20:42:46 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 3 Denis Kurz 2017-01-07 21:50:20 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.