Bug 254926

Summary: Postgres SQL 9.x scripts incompatibility
Product: Akonadi Reporter: Vladislav Mikhailikov <vmikhailikov>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: 1.4.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description Vladislav Mikhailikov 2010-10-22 06:28:35 UTC
Version:           1.4.0 (using KDE 4.5.2) 
OS:                Linux

Akonadi server fails to start after switch to Postgress 9.x

Reproducible: Always

Steps to Reproduce:
Try to use Postgres 9.x as Akonadi server backend

Actual Results:  
[akonadiserver] QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work.
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] Database "tanuki" opened using driver "QPSQL"
[akonadiserver] DbInitializer::run()
[akonadiserver] checking table  "SchemaVersionTable"
[akonadiserver] "CREATE TABLE SchemaVersionTable (version INTEGER NOT NULL DEFAULT 0)"
[akonadiserver] "INSERT INTO SchemaVersionTable (version) VALUES (19)"
[akonadiserver] checking table  "ResourceTable"
[akonadiserver] "CREATE TABLE ResourceTable (id SERIAL PRIMARY KEY, name BYTEA UNIQUE NOT NULL, isVirtual BOOL DEFAULT false)"
[akonadiserver] NOTICE:  CREATE TABLE will create implicit sequence "resourcetable_id_seq" for serial column "resourcetable.id"
[akonadiserver] NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "resourcetable_pkey" for table "resourcetable"
[akonadiserver] NOTICE:  CREATE TABLE / UNIQUE will create implicit index "resourcetable_name_key" for table "resourcetable"
[akonadiserver] "INSERT INTO ResourceTable (name,isVirtual) VALUES ('akonadi_search_resource',true)"
[akonadiserver] checking table  "CollectionTable"
[akonadiserver] "CREATE TABLE CollectionTable (id SERIAL PRIMARY KEY, remoteId BYTEA, remoteRevision BYTEA, name BYTEA NOT NULL, parentId int8 REFERENCES CollectionTable(id) ON DELETE CASCADE ON UPDATE CASCADE, resourceId int8 NOT NULL REFERENCES ResourceTable(id) ON DELETE CASCADE ON UPDATE CASCADE, subscribed BOOL NOT NULL DEFAULT true, cachePolicyInherit BOOL NOT NULL DEFAULT true, cachePolicyCheckInterval INTEGER NOT NULL DEFAULT -1, cachePolicyCacheTimeout INTEGER NOT NULL DEFAULT -1, cachePolicySyncOnDemand BOOL NOT NULL DEFAULT false, cachePolicyLocalParts BYTEA, queryString BYTEA, queryLanguage BYTEA)"
[akonadiserver] NOTICE:  CREATE TABLE will create implicit sequence "collectiontable_id_seq" for serial column "collectiontable.id"
[akonadiserver] NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "collectiontable_pkey" for table "collectiontable"
[akonadiserver] adding index "CREATE UNIQUE INDEX CollectionTable_parentAndNameIndex ON CollectionTable (parentId,name)"
[akonadiserver] "INSERT INTO CollectionTable (resourceId,name,parentId) VALUES (1,'Search',NULL)"
[akonadiserver] checking table  "MimeTypeTable"
[akonadiserver] "CREATE TABLE MimeTypeTable (id SERIAL PRIMARY KEY, name BYTEA UNIQUE NOT NULL)"
[akonadiserver] NOTICE:  CREATE TABLE will create implicit sequence "mimetypetable_id_seq" for serial column "mimetypetable.id"
[akonadiserver] NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "mimetypetable_pkey" for table "mimetypetable"
[akonadiserver] NOTICE:  CREATE TABLE / UNIQUE will create implicit index "mimetypetable_name_key" for table "mimetypetable"
[akonadiserver] "INSERT INTO MimeTypeTable (name) VALUES ('application/octet-stream')"
[akonadiserver] "INSERT INTO MimeTypeTable (name) VALUES ('message/rfc822')"
[akonadiserver] "INSERT INTO MimeTypeTable (name) VALUES ('text/calendar')"
[akonadiserver] "INSERT INTO MimeTypeTable (name) VALUES ('text/vcard')"
[akonadiserver] "INSERT INTO MimeTypeTable (name) VALUES ('inode/directory')"
[akonadiserver] checking table  "PimItemTable"
[akonadiserver] "CREATE TABLE PimItemTable (id SERIAL PRIMARY KEY, rev INTEGER NOT NULL DEFAULT 0, remoteId BYTEA, remoteRevision BYTEA, collectionId int8 REFERENCES CollectionTable(id) ON DELETE CASCADE ON UPDATE CASCADE, mimeTypeId int8 REFERENCES MimeTypeTable(id) ON DELETE CASCADE ON UPDATE CASCADE, datetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP, atime TIMESTAMP, dirty BOOL, size int8 NOT NULL DEFAULT 0)"
[akonadiserver] NOTICE:  CREATE TABLE will create implicit sequence "pimitemtable_id_seq" for serial column "pimitemtable.id"
[akonadiserver] NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "pimitemtable_pkey" for table "pimitemtable"
[akonadiserver] adding index "CREATE  INDEX PimItemTable_collectionIndex ON PimItemTable (collectionId)"
[akonadiserver] checking table  "FlagTable"
[akonadiserver] "CREATE TABLE FlagTable (id SERIAL PRIMARY KEY, name BYTEA UNIQUE NOT NULL)"
[akonadiserver] NOTICE:  CREATE TABLE will create implicit sequence "flagtable_id_seq" for serial column "flagtable.id"
[akonadiserver] NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "flagtable_pkey" for table "flagtable"
[akonadiserver] NOTICE:  CREATE TABLE / UNIQUE will create implicit index "flagtable_name_key" for table "flagtable"
[akonadiserver] "INSERT INTO FlagTable (name) VALUES ('important')"
[akonadiserver] "INSERT INTO FlagTable (name) VALUES ('has_attachment')"
[akonadiserver] "INSERT INTO FlagTable (name) VALUES ('spam')"
[akonadiserver] "INSERT INTO FlagTable (name) VALUES ('\\ANSWERED')"
[akonadiserver] WARNING:  nonstandard use of \\ in a string literal
[akonadiserver] LINE 1: INSERT INTO FlagTable (name) VALUES ('\\ANSWERED')
[akonadiserver] ^
[akonadiserver] HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
[akonadiserver] "Unable to add initial data to table 'FlagTable'.
[akonadiserver] Query error: 'ERROR:  invalid input syntax for type bytea
[akonadiserver] LINE 1: INSERT INTO FlagTable (name) VALUES ('\\ANSWERED')
[akonadiserver] ^
[akonadiserver] QPSQL: Unable to create query'
[akonadiserver] Query was: INSERT INTO FlagTable (name) VALUES ('\\ANSWERED')"
[akonadiserver] Unable to initialize database.
[akonadiserver] "[
[akonadiserver] 0: akonadiserver(_Z11akBacktracev+0x39) [0x40b5f9]
[akonadiserver] 1: akonadiserver() [0x40bb3a]
[akonadiserver] 2: /lib/libc.so.6() [0x30016324c0]
[akonadiserver] 3: /lib/libc.so.6(gsignal+0x35) [0x3001632445]
[akonadiserver] 4: /lib/libc.so.6(abort+0x180) [0x3001633860]
[akonadiserver] 5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f70ba3cb9b4]
[akonadiserver] 6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa8) [0x40cc38]
[akonadiserver] 7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x77) [0x7f70ba4599b7]
[akonadiserver] 8: /usr/lib64/qt4/libQtCore.so.4(+0x10d209) [0x7f70ba467209]
[akonadiserver] 9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x39) [0x7f70ba468409]
[akonadiserver] 10: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x6c1) [0x30a00637f1]
[akonadiserver] 11: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x4a) [0x30a0064baa]
[akonadiserver] 12: akonadiserver(main+0x3ac) [0x40651c]
[akonadiserver] 13: /lib/libc.so.6(__libc_start_main+0xfd) [0x300161ed2d]
[akonadiserver] 14: akonadiserver() [0x406079]
[akonadiserver] ]
[akonadiserver] "
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work.
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] Database "tanuki" opened using driver "QPSQL"
[akonadiserver] DbInitializer::run()
[akonadiserver] checking table  "SchemaVersionTable"
[akonadiserver] "ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0"
[akonadiserver] "Unable to add column 'version' to table 'SchemaVersionTable'.
[akonadiserver] Query error: 'ERROR:  column "version" of relation "schemaversiontable" already exists
[akonadiserver] QPSQL: Unable to create query'"
[akonadiserver] Unable to initialize database.
[akonadiserver] "[
[akonadiserver] 0: akonadiserver(_Z11akBacktracev+0x39) [0x40b5f9]
[akonadiserver] 1: akonadiserver() [0x40bb3a]
[akonadiserver] 2: /lib/libc.so.6() [0x30016324c0]
[akonadiserver] 3: /lib/libc.so.6(gsignal+0x35) [0x3001632445]
[akonadiserver] 4: /lib/libc.so.6(abort+0x180) [0x3001633860]
[akonadiserver] 5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f21d71a89b4]
[akonadiserver] 6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa8) [0x40cc38]
[akonadiserver] 7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x77) [0x7f21d72369b7]
[akonadiserver] 8: /usr/lib64/qt4/libQtCore.so.4(+0x10d209) [0x7f21d7244209]
[akonadiserver] 9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x39) [0x7f21d7245409]
[akonadiserver] 10: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x6c1) [0x30a00637f1]
[akonadiserver] 11: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x4a) [0x30a0064baa]
[akonadiserver] 12: akonadiserver(main+0x3ac) [0x40651c]
[akonadiserver] 13: /lib/libc.so.6(__libc_start_main+0xfd) [0x300161ed2d]
[akonadiserver] 14: akonadiserver() [0x406079]
[akonadiserver] ]
[akonadiserver] "
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work.
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] Database "tanuki" opened using driver "QPSQL"
[akonadiserver] DbInitializer::run()
[akonadiserver] checking table  "SchemaVersionTable"
[akonadiserver] "ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0"
[akonadiserver] "Unable to add column 'version' to table 'SchemaVersionTable'.
[akonadiserver] Query error: 'ERROR:  column "version" of relation "schemaversiontable" already exists
[akonadiserver] QPSQL: Unable to create query'"
[akonadiserver] Unable to initialize database.
[akonadiserver] "[
[akonadiserver] 0: akonadiserver(_Z11akBacktracev+0x39) [0x40b5f9]
[akonadiserver] 1: akonadiserver() [0x40bb3a]
[akonadiserver] 2: /lib/libc.so.6() [0x30016324c0]
[akonadiserver] 3: /lib/libc.so.6(gsignal+0x35) [0x3001632445]
[akonadiserver] 4: /lib/libc.so.6(abort+0x180) [0x3001633860]
[akonadiserver] 5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f53171299b4]
[akonadiserver] 6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa8) [0x40cc38]
[akonadiserver] 7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x77) [0x7f53171b79b7]
[akonadiserver] 8: /usr/lib64/qt4/libQtCore.so.4(+0x10d209) [0x7f53171c5209]
[akonadiserver] 9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x39) [0x7f53171c6409]
[akonadiserver] 10: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x6c1) [0x30a00637f1]
[akonadiserver] 11: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x4a) [0x30a0064baa]
[akonadiserver] 12: akonadiserver(main+0x3ac) [0x40651c]
[akonadiserver] 13: /lib/libc.so.6(__libc_start_main+0xfd) [0x300161ed2d]
[akonadiserver] 14: akonadiserver() [0x406079]
[akonadiserver] ]
[akonadiserver] "
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work.
[akonadiserver] This version of PostgreSQL is not supported and may not work.
[akonadiserver] Database "tanuki" opened using driver "QPSQL"
[akonadiserver] DbInitializer::run()
[akonadiserver] checking table  "SchemaVersionTable"
[akonadiserver] "ALTER TABLE SchemaVersionTable ADD COLUMN version INTEGER NOT NULL DEFAULT 0"
[akonadiserver] "Unable to add column 'version' to table 'SchemaVersionTable'.
[akonadiserver] Query error: 'ERROR:  column "version" of relation "schemaversiontable" already exists
[akonadiserver] QPSQL: Unable to create query'"
[akonadiserver] Unable to initialize database.
[akonadiserver] "[
[akonadiserver] 0: akonadiserver(_Z11akBacktracev+0x39) [0x40b5f9]
[akonadiserver] 1: akonadiserver() [0x40bb3a]
[akonadiserver] 2: /lib/libc.so.6() [0x30016324c0]
[akonadiserver] 3: /lib/libc.so.6(gsignal+0x35) [0x3001632445]
[akonadiserver] 4: /lib/libc.so.6(abort+0x180) [0x3001633860]
[akonadiserver] 5: /usr/lib64/qt4/libQtCore.so.4(_Z17qt_message_output9QtMsgTypePKc+0x74) [0x7f8e6e3789b4]
[akonadiserver] 6: akonadiserver(_ZN15FileDebugStream9writeDataEPKcx+0xa8) [0x40cc38]
[akonadiserver] 7: /usr/lib64/qt4/libQtCore.so.4(_ZN9QIODevice5writeEPKcx+0x77) [0x7f8e6e4069b7]
[akonadiserver] 8: /usr/lib64/qt4/libQtCore.so.4(+0x10d209) [0x7f8e6e414209]
[akonadiserver] 9: /usr/lib64/qt4/libQtCore.so.4(_ZN11QTextStreamD1Ev+0x39) [0x7f8e6e415409]
[akonadiserver] 10: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServerC1EP7QObject+0x6c1) [0x30a00637f1]
[akonadiserver] 11: /usr/lib/libakonadiprivate.so.1(_ZN7Akonadi13AkonadiServer8instanceEv+0x4a) [0x30a0064baa]
[akonadiserver] 12: akonadiserver(main+0x3ac) [0x40651c]
[akonadiserver] 13: /lib/libc.so.6(__libc_start_main+0xfd) [0x300161ed2d]
[akonadiserver] 14: akonadiserver() [0x406079]
[akonadiserver] ]
[akonadiserver] "
ProcessControl: Application 'akonadiserver' returned with exit code 255 (Unknown error)
"akonadiserver" crashed too often and will not be restarted!

Expected Results:  
Work as it were with Postgres 8.4.x
Comment 1 Tobias Koenig 2010-11-07 20:24:10 UTC

*** This bug has been marked as a duplicate of bug 252120 ***