View Issue Details

IDProjectCategoryView StatusLast Update
0004246SOGoActiveSyncpublic2018-05-16 14:50
Reportermpeterma Assigned To 
Status newResolutionopen 
Platformamd64OSFreeBSDOS Version11.1
Product Version3.2.8 
Summary0004246: SOGo seems to expect row c_uid in table sogo_cache_folder_xxxx, causing ActiveSync Exception, after update from 3.2.7 -> 3.2.8

With SOGo 3.2.8, ActiveSync stopped working, raising exceptions in the log file like this:

Aug 08 05:37:23 sogod [1697]: Sleeping 60 seconds while detecting changes in Ping...
Aug 08 05:38:06 sogod [1627]: [WARN] pid 1697 has been hanging in the same request for 8 minutes
Aug 08 05:38:26 sogod [1697]: an exception occurred when executing query 'SELECT * FROM sogo_cache_folder_xxxxx WHERE c_path = '/GD2QVPDU9T5I15E7AKHE98CQFC' AND c_uid = 'xxxxx''
Aug 08 05:38:26 sogod [1697]: exception is ' NAME:PostgreSQL72FatalError REASON:fatal pgsql error (channel=>): ERROR: column "c_uid" does not exist
LINE 1: ... WHERE c_path = '/GD2QVPDU9T5I15E7AKHE98CQFC' AND c_uid = 'v...

It looks like it tries to operate like it is running on the nine tables schema, but still accessing the table with the username in the table name. Is there a way (and need?) to explicitly tell SOGo to not use the nine tables schema but instead operate on the "classic" three tables per user?

Steps To Reproduce
  • Update SOGo from 3.2.7 to 3.2.8
  • no configuration change was applied from 3.2.7 to 3.2.8
Additional Information
  • using SOGo with PostgreSQL Database
  • using the FreeBSD Ports version of SOGo
TagsNo tags attached.




2017-08-11 17:23

administrator   ~0012165

Produce a stack trace when the exception is raised.



2017-08-28 09:24

reporter   ~0012238

Also suddenly happened to me on 3.2.10. (Only build 3.2.10 again, no configuration change).
Fixed it by backing up, droping the tables and then restoring.

Christian Mack

Christian Mack

2017-08-29 11:09

developer   ~0012242

Did you try testing it with sogo-tool checkup?



2017-08-29 16:41

reporter   ~0012243

Last edited: 2017-08-29 16:42

Hi there,

this looks indeed like you are using the old DB layout. E.g. several tables per user, so the tables did not have c_uid in them.
If the query is looking for c_uid, it seems that the query is expecting the new DB layout, where all users share tables and are identified by the c_uid field / key.

As I do not know if the old schema can be enforced, maybe migrating to the new one is an option?

and look at the sql update script in
Note: As the file states, this switch is not done automatically on any upgrade, although new installs of SOGo will default to it AFAIK.



2018-05-16 14:23

reporter   ~0012884

@mpeterma Did updating the database layout using the script resolve the problem for you?
Im experiencing the exact same issue. Also using FreeBSD.

Issue History

Date Modified Username Field Change
2017-08-08 04:07 mpeterma New Issue
2017-08-11 17:22 ludovic Severity block => minor
2017-08-11 17:23 ludovic Note Added: 0012165
2017-08-28 09:24 SogoUser_101 Note Added: 0012238
2017-08-29 11:09 Christian Mack Note Added: 0012242
2017-08-29 16:41 Waschbuesch Note Added: 0012243
2017-08-29 16:42 Waschbuesch Note Edited: 0012243
2018-05-16 14:23 mschaefer Note Added: 0012884